Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Geolocation / error-clear-watch.html
blob83c4583282057fbe98fd6d01d860b3e93dbf7b15
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("This tests removing the watcher from an error callback does not causes assertions.");
10 if (!window.testRunner || !window.internals)
11 debug('This test can not run without testRunner or internals');
13 internals.setGeolocationPermission(document, true);
14 internals.setGeolocationPositionUnavailableError(document, "debug");
16 var watchId = navigator.geolocation.watchPosition(function() {
17 navigator.geolocation.clearWatch(watchId);
18 finishJSTest();
19 }, function(e) {
20 navigator.geolocation.clearWatch(watchId);
21 finishJSTest();
22 });
25 window.jsTestIsAsync = true;
26 </script>
27 </body>
28 </html>