diff options
Diffstat (limited to 'LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js')
-rw-r--r-- | LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js b/LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js new file mode 100644 index 0000000..08e6b21 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js @@ -0,0 +1,13 @@ +description("Exercises a condition where the DOMWindow may leak if Geolocation requests are ongoing when the page is navigated away or closed. The page should reoload."); + +if (window.layoutTestController) layoutTestController.setGeolocationPermission(true); +if (window.layoutTestController) layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100.0); + +navigator.geolocation.watchPosition(function() {}, null); + +document.body.onload = function() { + location = "data:text/html,Exercises a condition where the DOMWindow may leak if Geolocation requests are ongoing when the page is navigated away or closed. Complete.<script>if (window.layoutTestController) layoutTestController.notifyDone();</" + "script>"; +} + +window.jsTestIsAsync = true; +window.successfullyParsed = true; |