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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/success-clear-watch.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 description("This tests removing the watcher from a position callback does not c auses assertions."); 10 description("This tests removing the watcher from a position callback does not c auses assertions.");
11 11
12 var mockLatitude = 51.478; 12 var mockLatitude = 51.478;
13 var mockLongitude = -0.166; 13 var mockLongitude = -0.166;
14 var mockAccuracy = 100; 14 var mockAccuracy = 100;
15 15
16 if (!window.testRunner || !window.mojo)
17 debug('This test can not run without testRunner or mojo');
18
19 geolocationServiceMock.then(mock => { 16 geolocationServiceMock.then(mock => {
20 mock.setGeolocationPermission(true); 17 mock.setGeolocationPermission(true);
21 mock.setGeolocationPosition(mockLatitude, 18 mock.setGeolocationPosition(mockLatitude,
22 mockLongitude, 19 mockLongitude,
23 mockAccuracy); 20 mockAccuracy);
24 21
25 var watchId = navigator.geolocation.watchPosition(function() { 22 var watchId = navigator.geolocation.watchPosition(function() {
26 navigator.geolocation.clearWatch(watchId); 23 navigator.geolocation.clearWatch(watchId);
27 finishJSTest(); 24 finishJSTest();
28 }, function(e) { 25 }, function(e) {
29 navigator.geolocation.clearWatch(watchId); 26 navigator.geolocation.clearWatch(watchId);
30 finishJSTest(); 27 finishJSTest();
31 }); 28 });
32 }); 29 });
33 30
34 window.jsTestIsAsync = true; 31 window.jsTestIsAsync = true;
35 </script> 32 </script>
36 </body> 33 </body>
37 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698