OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("This tests removing the watcher from an error callback does not cau
ses assertions."); | 8 description("This tests removing the watcher from an error callback does not cau
ses assertions."); |
9 | 9 |
10 var mockMessage = "debug"; | 10 var mockMessage = "debug"; |
11 | 11 |
12 if (window.testRunner) { | 12 if (window.testRunner) { |
13 testRunner.setGeolocationPermission(true); | 13 testRunner.setGeolocationPermission(true); |
14 testRunner.setMockGeolocationPositionUnavailableError(mockMessage); | 14 testRunner.setMockGeolocationPositionUnavailableError(mockMessage); |
15 } else | 15 } else |
16 debug('This test can not be run without the LayoutTestController'); | 16 debug('This test can not be run without the LayoutTestController'); |
17 | 17 |
18 var watchId = navigator.geolocation.watchPosition(function() { | 18 var watchId = navigator.geolocation.watchPosition(function() { |
19 navigator.geolocation.clearWatch(watchId); | 19 navigator.geolocation.clearWatch(watchId); |
20 finishJSTest(); | 20 finishJSTest(); |
21 }, function(e) { | 21 }, function(e) { |
22 navigator.geolocation.clearWatch(watchId); | 22 navigator.geolocation.clearWatch(watchId); |
23 finishJSTest(); | 23 finishJSTest(); |
24 }); | 24 }); |
25 | 25 |
26 | 26 |
27 window.jsTestIsAsync = true; | 27 window.jsTestIsAsync = true; |
28 </script> | 28 </script> |
29 <script src="../../js/resources/js-test-post.js"></script> | |
30 </body> | 29 </body> |
31 </html> | 30 </html> |
OLD | NEW |