OLD | NEW |
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; |
OLD | NEW |