diff options
Diffstat (limited to 'LayoutTests/fast')
3 files changed, 27 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/ongoing-request-leak-expected.txt b/LayoutTests/fast/dom/Geolocation/ongoing-request-leak-expected.txt new file mode 100644 index 0000000..3fb979f --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/ongoing-request-leak-expected.txt @@ -0,0 +1 @@ +Exercises a condition where the DOMWindow may leak if Geolocation requests are ongoing when the page is navigated away or closed. Complete. diff --git a/LayoutTests/fast/dom/Geolocation/ongoing-request-leak.html b/LayoutTests/fast/dom/Geolocation/ongoing-request-leak.html new file mode 100644 index 0000000..dab385e --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/ongoing-request-leak.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> +<head> +<link rel="stylesheet" href="../../js/resources/js-test-style.css"> +<script src="../../js/resources/js-test-pre.js"></script> +</head> +<body> +<p id="description"></p> +<div id="console"></div> +<script src="script-tests/ongoing-request-leak.js"></script> +<script src="../../js/resources/js-test-post.js"></script> +</body> +</html> 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; |