OLD | NEW |
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 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."); | 10 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."); |
11 | 11 |
12 function onFirstIframeLoaded() { | 12 function onFirstIframeLoaded() { |
13 iframe.src = 'resources/callback-to-deleted-context-inner2.html'; | 13 iframe.src = 'resources/callback-to-deleted-context-inner2.html'; |
14 } | 14 } |
15 | 15 |
16 function onSecondIframeLoaded() { | 16 function onSecondIframeLoaded() { |
17 window.setTimeout(function() { | 17 window.setTimeout(function() { |
18 testFailed('No callbacks invoked'); | 18 testFailed('No callbacks invoked'); |
19 finishJSTest(); | 19 finishJSTest(); |
20 }, 500); | 20 }, 500); |
21 } | 21 } |
22 | 22 |
23 var iframe = document.createElement('iframe'); | 23 var iframe = document.createElement('iframe'); |
24 geolocationServiceMock.then(mock => { | 24 geolocationServiceMock.then(mock => { |
25 mock.setGeolocationPermission(true); | 25 mock.setGeolocationPermission(true); |
26 mock.setGeolocationPosition(51.478, -0.166, 100); | 26 mock.setGeolocationPosition(51.478, -0.166, 100); |
27 iframe.src = 'resources/callback-to-deleted-context-inner1.html'; | 27 iframe.src = 'resources/callback-to-deleted-context-inner1.html'; |
28 document.body.appendChild(iframe); | 28 document.body.appendChild(iframe); |
29 }); | 29 }); |
30 | 30 |
31 window.jsTestIsAsync = true; | 31 window.jsTestIsAsync = true; |
32 </script> | 32 </script> |
33 </body> | 33 </body> |
34 </html> | 34 </html> |
OLD | NEW |