diff options
Diffstat (limited to 'LayoutTests/fast/dom/Geolocation/script-tests/timeout.js')
-rw-r--r-- | LayoutTests/fast/dom/Geolocation/script-tests/timeout.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/timeout.js b/LayoutTests/fast/dom/Geolocation/script-tests/timeout.js index 49cab29..0a027d9 100644 --- a/LayoutTests/fast/dom/Geolocation/script-tests/timeout.js +++ b/LayoutTests/fast/dom/Geolocation/script-tests/timeout.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; navigator.geolocation.getCurrentPosition(function(p) { @@ -22,7 +25,6 @@ navigator.geolocation.getCurrentPosition(function(p) { }, { timeout: 1000 }); -window.layoutTestController.waitUntilDone(); window.jsTestIsAsync = true; window.successfullyParsed = true; |