Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js

Issue 1948033003: Convert most geolocation layout tests to use a JS mock implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-disconnect
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 description("Tests the assertion that the GeolocationClient should not be updati ng<br>" + 1 description("Tests the assertion that the GeolocationClient should not be updati ng<br>" +
2 "when the GeolocationController is destroyed.<br>" + 2 "when the GeolocationController is destroyed.<br>" +
3 "See https://bugs.webkit.org/show_bug.cgi?id=52216"); 3 "See https://bugs.webkit.org/show_bug.cgi?id=52216");
4 4
5 if (!window.testRunner || !window.internals) 5 if (!window.testRunner || !window.mojo)
6 debug('This test can not run without testRunner or internals'); 6 debug('This test can not run without testRunner or mojo');
7 7
8 testRunner.waitUntilDone(); 8 testRunner.waitUntilDone();
9 testRunner.setCanOpenWindows(); 9 testRunner.setCanOpenWindows();
10 testRunner.setCloseRemainingWindowsWhenComplete(true); 10 testRunner.setCloseRemainingWindowsWhenComplete(true);
11 11
12 var otherWindow; 12 var otherWindow;
13 13
14 function gotPosition(p) 14 function gotPosition(p)
15 { 15 {
16 testPassed("Received Geoposition."); 16 testPassed("Received Geoposition.");
17 otherWindow.close(); 17 otherWindow.close();
18 window.setTimeout(waitForWindowToClose, 0); 18 window.setTimeout(waitForWindowToClose, 0);
19 } 19 }
20 20
21 function waitForWindowToClose() 21 function waitForWindowToClose()
22 { 22 {
23 if (!otherWindow.closed) { 23 if (!otherWindow.closed) {
24 window.setTimeout(waitForWindowToClose, 0); 24 window.setTimeout(waitForWindowToClose, 0);
25 return; 25 return;
26 } 26 }
27 testPassed("Success - no crash!"); 27 testPassed("Success - no crash!");
28 finishJSTest(); 28 finishJSTest();
29 } 29 }
30 30
31 debug("Main page opening resources/window-close-popup.html"); 31 debug("Main page opening resources/window-close-popup.html");
32 otherWindow = window.open("resources/window-close-popup.html"); 32 otherWindow = window.open("resources/window-close-popup.html");
33 33
34 window.jsTestIsAsync = true; 34 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698