1 description("Tests that when timeout is zero (and maximumAge is too), the error callback is called immediately with code TIMEOUT.");
3 if (!window.testRunner || !window.internals)
4 debug('This test can not run without testRunner or internals');
6 internals.setGeolocationClientMock(document);
7 internals.setGeolocationPosition(document, 51.478, -0.166, 100.0);
10 navigator.geolocation.getCurrentPosition(function(p) {
11 testFailed('Success callback invoked unexpectedly');
15 shouldBe('error.code', 'error.TIMEOUT');
16 shouldBe('error.message', '"Timeout expired"');
22 window.jsTestIsAsync = true;