Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Geolocation / watchPosition-unique.html
blob3d98033c48e35f180dab4e5ece7110bce2d4e606
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>
9 description("Tests that navigator.geolocation.watchPosition returns unique results within its script execution context.");
11 if (!window.testRunner || !window.internals)
12 debug('This test can not run without testRunner or internals');
14 internals.setGeolocationClientMock(document);
15 internals.setGeolocationPosition(document, 51.478, -0.166, 100.0);
17 var watchID1 = navigator.geolocation.watchPosition(function() { });
18 var watchID2 = navigator.geolocation.watchPosition(function() { });
19 var watchID3 = navigator.geolocation.watchPosition(function() { });
21 shouldBeTrue("watchID1 > 0");
22 shouldBeTrue("watchID2 > 0");
23 shouldBeTrue("watchID3 > 0");
24 shouldBeTrue("watchID1 !== watchID2");
25 shouldBeTrue("watchID1 !== watchID3");
26 shouldBeTrue("watchID2 !== watchID3");
28 </script>
29 </body>
30 </html>