| OLD | NEW |
| 1 description("Tests that when a request is made on a Geolocation object after its
frame has been disconnected, no callbacks are made and no crash occurs."); | 1 description("Tests that when a request is made on a Geolocation object after its
frame has been disconnected, no callbacks are made and no crash occurs."); |
| 2 | 2 |
| 3 if (!window.testRunner || !window.mojo) | |
| 4 debug('This test can not run without testRunner or mojo'); | |
| 5 | |
| 6 var iframe = document.createElement('iframe'); | 3 var iframe = document.createElement('iframe'); |
| 7 | 4 |
| 8 geolocationServiceMock.then(mock => { | 5 geolocationServiceMock.then(mock => { |
| 9 mock.setGeolocationPermission(true); | 6 mock.setGeolocationPermission(true); |
| 10 mock.setGeolocationPosition(51.478, -0.166, 100); | 7 mock.setGeolocationPosition(51.478, -0.166, 100); |
| 11 | 8 |
| 12 iframe.src = 'resources/disconnected-frame-already-inner1.html'; | 9 iframe.src = 'resources/disconnected-frame-already-inner1.html'; |
| 13 document.body.appendChild(iframe); | 10 document.body.appendChild(iframe); |
| 14 }); | 11 }); |
| 15 | 12 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 28 }); | 25 }); |
| 29 setTimeout(finishTest, 1000); | 26 setTimeout(finishTest, 1000); |
| 30 } | 27 } |
| 31 | 28 |
| 32 function finishTest() { | 29 function finishTest() { |
| 33 debug('Method called on Geolocation object with disconnected Frame.'); | 30 debug('Method called on Geolocation object with disconnected Frame.'); |
| 34 finishJSTest(); | 31 finishJSTest(); |
| 35 } | 32 } |
| 36 | 33 |
| 37 window.jsTestIsAsync = true; | 34 window.jsTestIsAsync = true; |
| OLD | NEW |