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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/callback-to-deleted-context.js

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 description("Tests that when a Geolocation request is made from a remote frame, and that frame's script context goes away before the Geolocation callback is mad e, the callback is made as usual."); 1 description("Tests that when a Geolocation request is made from a remote frame, and that frame's script context goes away before the Geolocation callback is mad e, the callback is made as usual.");
2 2
3 function onFirstIframeLoaded() { 3 function onFirstIframeLoaded() {
4 iframe.src = 'resources/callback-to-deleted-context-inner2.html'; 4 iframe.src = 'resources/callback-to-deleted-context-inner2.html';
5 } 5 }
6 6
7 function onSecondIframeLoaded() { 7 function onSecondIframeLoaded() {
8 window.setTimeout(function() { 8 window.setTimeout(function() {
9 testFailed('No callbacks invoked'); 9 testFailed('No callbacks invoked');
10 finishJSTest(); 10 finishJSTest();
11 }, 500); 11 }, 500);
12 } 12 }
13 13
14 var iframe = document.createElement('iframe'); 14 var iframe = document.createElement('iframe');
15 iframe.src = 'resources/callback-to-deleted-context-inner1.html'; 15 geolocationServiceMock.then(mock => {
16 document.body.appendChild(iframe); 16 mock.setGeolocationPermission(true);
17 mock.setGeolocationPosition(51.478, -0.166, 100);
18 iframe.src = 'resources/callback-to-deleted-context-inner1.html';
19 document.body.appendChild(iframe);
20 });
17 21
18 window.jsTestIsAsync = true; 22 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698