1 description("Tests Geolocation when permission is denied, using the mock service.");
3 if (!window.testRunner || !window.internals)
4 debug('This test can not run without testRunner or internals');
6 internals.setGeolocationClientMock(document);
8 internals.setGeolocationPermission(document, false);
9 internals.setGeolocationPosition(document, 51.478, -0.166, 100.0);
12 navigator.geolocation.getCurrentPosition(function(p) {
13 testFailed('Success callback invoked unexpectedly');
17 shouldBe('error.code', 'error.PERMISSION_DENIED');
18 shouldBe('error.message', '"User denied Geolocation"');
22 window.jsTestIsAsync = true;