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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html

Issue 1948033003: Convert most geolocation layout tests to use a JS mock implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-disconnect
Patch Set: Created 4 years, 7 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> 4 <script>
5 function makeGeolocationRequest() { 5 function makeGeolocationRequest() {
6 if (!window.testRunner || !window.internals) 6 var parent = window.parent;
7 debug('This test can not run without testRunner or internals');
8 7
9 internals.setGeolocationClientMock(document);
10 internals.setGeolocationPermission(document, true);
11 internals.setGeolocationPosition(document, 51.478, -0.166, 100);
12
13 var parent = window.parent;
14 8
15 // Make request from remote frame, this frame will be gone by the time the Geolocation 9 // Make request from remote frame, this frame will be gone by the time the Geolocation
16 // object attempts to invoke the callback. 10 // object attempts to invoke the callback.
17 window.parent.navigator.geolocation.getCurrentPosition(function() { 11 window.parent.navigator.geolocation.getCurrentPosition(function() {
18 parent.testPassed('Success callback invoked'); 12 parent.testPassed('Success callback invoked');
19 parent.finishJSTest(); 13 parent.finishJSTest();
20 }, function() { 14 }, function() {
21 parent.testFailed('Error callback invoked unexpectedly'); 15 parent.testFailed('Error callback invoked unexpectedly');
22 parent.finishJSTest(); 16 parent.finishJSTest();
23 }); 17 });
24 } 18 }
25 </script> 19 </script>
26 </head> 20 </head>
27 <body onload="window.parent.onFirstIframeLoaded()", onunload="makeGeolocationR equest()"> 21 <body onload="window.parent.onFirstIframeLoaded()", onunload="makeGeolocationR equest()">
28 <p>This frame should be replaced before the test ends</p> 22 <p>This frame should be replaced before the test ends</p>
29 </body> 23 </body>
30 </html> 24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698