diff options
Diffstat (limited to 'LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js')
-rw-r--r-- | LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js b/LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js index 9867084..03076bc 100644 --- a/LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js +++ b/LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js @@ -1,20 +1,20 @@ description("Tests that when timeout is zero (and maximumAge is too), the error callback is called immediately with code TIMEOUT."); -layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100.0); +if (window.layoutTestController) + layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100.0); var error; navigator.geolocation.getCurrentPosition(function(p) { testFailed('Success callback invoked unexpectedly'); finishJSTest(); }, function(e) { - error = e + error = e; shouldBe('error.code', 'error.TIMEOUT'); shouldBe('error.message', '"Timeout expired"'); finishJSTest(); }, { timeout: 0 }); -window.layoutTestController.waitUntilDone(); window.jsTestIsAsync = true; window.successfullyParsed = true; |