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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/callback-to-remote-context-inner.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 src="../../../../resources/js-test.js"></script>
5 <script src="../../../../resources/mojo-helpers.js"></script>
6 <script src="geolocation-mock.js"></script>
4 <script> 7 <script>
5 function init() { 8 function init() {
6 if (!window.testRunner || !window.internals) 9 if (!window.testRunner || !window.mojo)
7 debug('This test can not run without testRunner or internals'); 10 debug('This test can not run without testRunner or mojo');
8 11
9 internals.setGeolocationClientMock(document); 12 geolocationServiceMock.then(mock => {
10 internals.setGeolocationPermission(document, true); 13 mock.setGeolocationPermission(true);
11 internals.setGeolocationPosition(document, 51.478, -0.166, 100); 14 mock.setGeolocationPosition(51.478, -0.166, 100);
12 window.parent.onIframeReady() 15 window.parent.onIframeReady()
16 });
13 } 17 }
14 </script> 18 </script>
15 </head> 19 </head>
16 <body onload="init()"> 20 <body onload="init()">
17 </body> 21 </body>
18 </html> 22 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698