diff options
Diffstat (limited to 'LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js')
-rw-r--r-- | LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js b/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js index aafcaf1..e7114d3 100644 --- a/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js +++ b/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js @@ -1,19 +1,21 @@ description("Tests Geolocation when permission is denied, using the mock service."); -window.layoutTestController.setGeolocationPermission(false); -window.layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100); +if (window.layoutTestController) { + layoutTestController.setGeolocationPermission(false); + layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100.0); +} else + debug('This test can not be run without the LayoutTestController'); var error; navigator.geolocation.getCurrentPosition(function(p) { testFailed('Success callback invoked unexpectedly'); finishJSTest(); }, function(e) { - error = e + error = e; shouldBe('error.code', 'error.PERMISSION_DENIED'); shouldBe('error.message', '"User denied Geolocation"'); finishJSTest(); }); -window.layoutTestController.waitUntilDone(); window.jsTestIsAsync = true; window.successfullyParsed = true; |