diff options
Diffstat (limited to 'LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js')
-rw-r--r-- | LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js b/LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js index 63e0569..fe26735 100644 --- a/LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js +++ b/LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js @@ -1,13 +1,14 @@ description("Tests that when a watch times out and is cleared from the error callback, there is no crash. This a regression test for https://bugs.webkit.org/show_bug.cgi?id=32111."); -window.layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100.0); +if (window.layoutTestController) + layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100.0); var error; var watchId = navigator.geolocation.watchPosition(function() { testFailed('Success callback invoked unexpectedly'); finishJSTest(); }, function(e) { - error = e + error = e; shouldBe('error.code', 'error.TIMEOUT'); shouldBe('error.message', '"Timeout expired"'); navigator.geolocation.clearWatch(watchId); @@ -16,7 +17,6 @@ var watchId = navigator.geolocation.watchPosition(function() { timeout: 0 }); -window.layoutTestController.waitUntilDone(); window.jsTestIsAsync = true; window.successfullyParsed = true; |