summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js')
-rw-r--r--LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js b/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js
index 7a86648..3a092b1 100644
--- a/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js
+++ b/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js
@@ -4,14 +4,17 @@ var mockLatitude = 51.478;
var mockLongitude = -0.166;
var mockAccuracy = 100;
-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) {
- position = p
+ position = p;
shouldBe('position.coords.latitude', 'mockLatitude');
shouldBe('position.coords.longitude', 'mockLongitude');
shouldBe('position.coords.accuracy', 'mockAccuracy');
@@ -25,7 +28,5 @@ navigator.geolocation.getCurrentPosition(function(p) {
finishJSTest();
});
-window.layoutTestController.waitUntilDone();
-
window.jsTestIsAsync = true;
window.successfullyParsed = true;