Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Geolocation / script-tests / window-close-crash.js
blob0aed32adc4cd42847dc52e479338b2ed3b24377a
1 description("Tests the assertion that the GeolocationClient should not be updating<br>" +
2             "when the GeolocationController is destroyed.<br>" +
3             "See https://bugs.webkit.org/show_bug.cgi?id=52216");
5 if (!window.testRunner || !window.internals)
6     debug('This test can not run without testRunner or internals');
8 testRunner.waitUntilDone();
9 testRunner.setCanOpenWindows();
10 testRunner.setCloseRemainingWindowsWhenComplete(true);
12 var otherWindow;
14 function gotPosition(p)
16     testPassed("Received Geoposition.");
17     otherWindow.close();
18     window.setTimeout(waitForWindowToClose, 0);
21 function waitForWindowToClose()
23     if (!otherWindow.closed) {
24         window.setTimeout(waitForWindowToClose, 0);
25         return;
26     }
27     testPassed("Success - no crash!");
28     finishJSTest();
31 debug("Main page opening resources/window-close-popup.html");
32 otherWindow = window.open("resources/window-close-popup.html");
34 window.jsTestIsAsync = true;