1 description("Tests that when a watch times out and is cleared from the error callback, there is no crash. This a regression test for https://bugs.webkit.org/show_bug.cgi?id=32111.");
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 var watchId = navigator.geolocation.watchPosition(function() {
11 testFailed('Success callback invoked unexpectedly');
15 shouldBe('error.code', 'error.TIMEOUT');
16 shouldBe('error.message', '"Timeout expired"');
17 navigator.geolocation.clearWatch(watchId);
18 window.setTimeout(finishJSTest, 0);
24 window.jsTestIsAsync = true;