diff options
Diffstat (limited to 'LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js')
-rw-r--r-- | LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js b/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js index 4b83ea7..f7b3c78 100644 --- a/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js +++ b/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js @@ -4,10 +4,13 @@ var mockLatitude = 51.478; var mockLongitude = -0.166; var mockAccuracy = 100.0; -window.layoutTestController.setGeolocationPermission(true); -window.layoutTestController.setMockGeolocationPosition(mockLatitude, - mockLongitude, - mockAccuracy); +if (window.layoutTestController) { + layoutTestController.setGeolocationPermission(true); + layoutTestController.setMockGeolocationPosition(mockLatitude, + mockLongitude, + mockAccuracy); +} else + debug('This test can not be run without the LayoutTestController'); var position; var successCallbackInvoked = false; @@ -30,9 +33,10 @@ navigator.geolocation.getCurrentPosition(function(p) { }); function continueTest() { - window.layoutTestController.setMockGeolocationPosition(++mockLatitude, - ++mockLongitude, - ++mockAccuracy); + if (window.layoutTestController) + layoutTestController.setMockGeolocationPosition(++mockLatitude, + ++mockLongitude, + ++mockAccuracy); navigator.geolocation.getCurrentPosition(function(p) { position = p; @@ -45,7 +49,6 @@ function continueTest() { finishJSTest(); }); } -window.layoutTestController.waitUntilDone(); window.jsTestIsAsync = true; window.successfullyParsed = true; |