1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../../resources/js-test.js"></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");