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/geolocation-api/clear-watch-invalid-id-crash.html

Issue 2671933003: Move Geolocation out from fast/dom. (Closed)
Patch Set: . Created 3 years, 10 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("Tests for a crash when clearWatch() is called with a zero ID.<br><b r>We call clearWatch() with a request in progress then navigate the page. This a ccesses the watchers map during cleanup and triggers the crash. This page should not be visible when the test completes."); 10 description("Tests for a crash when clearWatch() is called with a zero ID.<br><b r>We call clearWatch() with a request in progress then navigate the page. This a ccesses the watchers map during cleanup and triggers the crash. This page should not be visible when the test completes.");
11 11
12 if (!window.testRunner) 12 if (!window.testRunner)
13 debug('This test can not run without testRunner'); 13 debug('This test can not run without testRunner');
14 14
15 document.body.onload = function() { 15 document.body.onload = function() {
16 geolocationServiceMock.then(mock => { 16 geolocationServiceMock.then(mock => {
17 mock.setGeolocationPermission(true); 17 mock.setGeolocationPermission(true);
18 mock.setGeolocationPosition(51.478, -0.166, 100); 18 mock.setGeolocationPosition(51.478, -0.166, 100);
19 19
20 navigator.geolocation.watchPosition(function() {}); 20 navigator.geolocation.watchPosition(function() {});
21 navigator.geolocation.clearWatch(0); 21 navigator.geolocation.clearWatch(0);
22 location = "data:text/html,TEST COMPLETE<script>if(window.testRunner) te stRunner.notifyDone();</" + "script>"; 22 location = "data:text/html,TEST COMPLETE<script>if(window.testRunner) te stRunner.notifyDone();</" + "script>";
23 }); 23 });
24 } 24 }
25 25
26 window.jsTestIsAsync = true; 26 window.jsTestIsAsync = true;
27 </script> 27 </script>
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698