blob: c76570b8383ee3f1b955def8f741c71f9fcebac3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
description("Tests Geolocation error callback using the mock service.");
var mockCode = 0;
var mockMessage = "debug";
window.layoutTestController.setMockGeolocationError(mockCode, mockMessage);
var error;
navigator.geolocation.getCurrentPosition(function(p) {
testFailed('Success callback invoked unexpectedly');
debug('<br /><span class="pass">TEST COMPLETE</span>');
window.layoutTestController.notifyDone();
}, function(e) {
error = e
shouldBe('error.code', 'mockCode');
shouldBe('error.message', 'mockMessage');
shouldBe('error.UNKNOWN_ERROR', 'undefined');
shouldBe('error.PERMISSION_DENIED', '1');
shouldBe('error.POSITION_UNAVAILABLE', '2');
shouldBe('error.TIMEOUT', '3');
debug('<br /><span class="pass">TEST COMPLETE</span>');
window.layoutTestController.notifyDone();
});
window.layoutTestController.waitUntilDone();
var isAsynchronous = true;
var successfullyParsed = true;
|