Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-unique.html

Issue 2642873002: Moves mojo.define -> gin.define. (Closed)
Patch Set: rebaseline Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../../resources/mojo-helpers.js"></script> 5 <script src="../../../resources/mojo-helpers.js"></script>
6 <script src="resources/geolocation-mock.js"></script> 6 <script src="resources/geolocation-mock.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <script> 9 <script>
10 10
11 description("Tests that navigator.geolocation.watchPosition returns unique resul ts within its script execution context."); 11 description("Tests that navigator.geolocation.watchPosition returns unique resul ts within its script execution context.");
12 12
13 if (!window.testRunner || !window.mojo)
14 debug('This test can not run without testRunner or mojo');
15
16 var watchID1; 13 var watchID1;
17 var watchID2; 14 var watchID2;
18 var watchID3; 15 var watchID3;
19 16
20 geolocationServiceMock.then(mock => { 17 geolocationServiceMock.then(mock => {
21 mock.setGeolocationPosition(51.478, -0.166, 100.0); 18 mock.setGeolocationPosition(51.478, -0.166, 100.0);
22 19
23 watchID1 = navigator.geolocation.watchPosition(function() { }); 20 watchID1 = navigator.geolocation.watchPosition(function() { });
24 watchID2 = navigator.geolocation.watchPosition(function() { }); 21 watchID2 = navigator.geolocation.watchPosition(function() { });
25 watchID3 = navigator.geolocation.watchPosition(function() { }); 22 watchID3 = navigator.geolocation.watchPosition(function() { });
26 23
27 shouldBeTrue("watchID1 > 0"); 24 shouldBeTrue("watchID1 > 0");
28 shouldBeTrue("watchID2 > 0"); 25 shouldBeTrue("watchID2 > 0");
29 shouldBeTrue("watchID3 > 0"); 26 shouldBeTrue("watchID3 > 0");
30 shouldBeTrue("watchID1 !== watchID2"); 27 shouldBeTrue("watchID1 !== watchID2");
31 shouldBeTrue("watchID1 !== watchID3"); 28 shouldBeTrue("watchID1 !== watchID3");
32 shouldBeTrue("watchID2 !== watchID3"); 29 shouldBeTrue("watchID2 !== watchID3");
33 finishJSTest(); 30 finishJSTest();
34 }); 31 });
35 32
36 window.jsTestIsAsync = true; 33 window.jsTestIsAsync = true;
37 </script> 34 </script>
38 </body> 35 </body>
39 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698