| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../resources/js-test.js"></script> | |
| 5 <script src="../../../resources/mojo-helpers.js"></script> | |
| 6 <script src="resources/geolocation-mock.js"></script> | |
| 7 </head> | |
| 8 <body> | |
| 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."); | |
| 11 | |
| 12 function onFirstIframeLoaded() { | |
| 13 iframe.src = 'resources/callback-to-deleted-context-inner2.html'; | |
| 14 } | |
| 15 | |
| 16 function onSecondIframeLoaded() { | |
| 17 window.setTimeout(function() { | |
| 18 testFailed('No callbacks invoked'); | |
| 19 finishJSTest(); | |
| 20 }, 500); | |
| 21 } | |
| 22 | |
| 23 var iframe = document.createElement('iframe'); | |
| 24 geolocationServiceMock.then(mock => { | |
| 25 mock.setGeolocationPermission(true); | |
| 26 mock.setGeolocationPosition(51.478, -0.166, 100); | |
| 27 iframe.src = 'resources/callback-to-deleted-context-inner1.html'; | |
| 28 document.body.appendChild(iframe); | |
| 29 }); | |
| 30 | |
| 31 window.jsTestIsAsync = true; | |
| 32 </script> | |
| 33 </body> | |
| 34 </html> | |
| OLD | NEW |