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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js

Issue 2642873002: Moves mojo.define -> gin.define. (Closed)
Patch Set: rebaseline Created 3 years, 11 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 that no timers will trigger for navigator.geolocation object after onunload."); 1 description("Tests that no timers will trigger for navigator.geolocation object after onunload.");
2 2
3 if (!window.testRunner || !window.mojo) 3 if (!window.testRunner)
4 debug('This test can not run without testRunner or mojo'); 4 debug('This test can not run without testRunner');
5 5
6 geolocationServiceMock.then(mock => { 6 geolocationServiceMock.then(mock => {
7 mock.setGeolocationPermission(true); 7 mock.setGeolocationPermission(true);
8 8
9 location = "data:text/html,You should have seen one unload alert appear.<scr ipt>window.setTimeout('if (window.testRunner) testRunner.notifyDone();', 100);</ script>"; 9 location = "data:text/html,You should have seen one unload alert appear.<scr ipt>window.setTimeout('if (window.testRunner) testRunner.notifyDone();', 100);</ script>";
10 }); 10 });
11 11
12 document.body.onunload = function() { 12 document.body.onunload = function() {
13 navigator.geolocation.getCurrentPosition( 13 navigator.geolocation.getCurrentPosition(
14 function(p) {alert('FAIL: Unexpected Geolocation success callback.');}, 14 function(p) {alert('FAIL: Unexpected Geolocation success callback.');},
15 function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.co de + e.message);}, 15 function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.co de + e.message);},
16 {timeout: 0, maximumAge:0} 16 {timeout: 0, maximumAge:0}
17 ); 17 );
18 alert("unload-called"); 18 alert("unload-called");
19 } 19 }
20 20
21 window.jsTestIsAsync = true; 21 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698