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="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 | 8 |
9 description("Tests that navigator.geolocation.watchPosition returns unique resul
ts within its script execution context."); | 9 description("Tests that navigator.geolocation.watchPosition returns unique resul
ts within its script execution context."); |
10 | 10 |
11 if (window.testRunner) | 11 if (window.testRunner) |
12 testRunner.setMockGeolocationPosition(51.478, -0.166, 100.0); | 12 testRunner.setMockGeolocationPosition(51.478, -0.166, 100.0); |
13 | 13 |
14 var watchID1 = navigator.geolocation.watchPosition(function() { }); | 14 var watchID1 = navigator.geolocation.watchPosition(function() { }); |
15 var watchID2 = navigator.geolocation.watchPosition(function() { }); | 15 var watchID2 = navigator.geolocation.watchPosition(function() { }); |
16 var watchID3 = navigator.geolocation.watchPosition(function() { }); | 16 var watchID3 = navigator.geolocation.watchPosition(function() { }); |
17 | 17 |
18 shouldBeTrue("watchID1 > 0"); | 18 shouldBeTrue("watchID1 > 0"); |
19 shouldBeTrue("watchID2 > 0"); | 19 shouldBeTrue("watchID2 > 0"); |
20 shouldBeTrue("watchID3 > 0"); | 20 shouldBeTrue("watchID3 > 0"); |
21 shouldBeTrue("watchID1 !== watchID2"); | 21 shouldBeTrue("watchID1 !== watchID2"); |
22 shouldBeTrue("watchID1 !== watchID3"); | 22 shouldBeTrue("watchID1 !== watchID3"); |
23 shouldBeTrue("watchID2 !== watchID3"); | 23 shouldBeTrue("watchID2 !== watchID3"); |
24 | 24 |
25 </script> | 25 </script> |
26 </body> | 26 </body> |
27 </html> | 27 </html> |
OLD | NEW |