Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js |
index c336bad337d77eb35fa6e99aa188d5c1ded176bf..828f89185938f2a66913fde17f57a88ffb9befcd 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js |
+++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js |
@@ -1,14 +1,13 @@ |
description("Tests that no timers will trigger for navigator.geolocation object after onunload."); |
-if (!window.testRunner || !window.internals) |
- debug('This test can not run without testRunner or internals'); |
+if (!window.testRunner || !window.mojo) |
+ debug('This test can not run without testRunner or mojo'); |
-internals.setGeolocationClientMock(document); |
-internals.setGeolocationPermission(document, true); |
+geolocationServiceMock.then(mock => { |
+ mock.setGeolocationPermission(true); |
-document.body.onload = function() { |
location = "data:text/html,You should have seen one unload alert appear.<script>window.setTimeout('if (window.testRunner) testRunner.notifyDone();', 100);</script>"; |
-} |
+}); |
document.body.onunload = function() { |
navigator.geolocation.getCurrentPosition( |