| OLD | NEW |
| (Empty) |
| 1 description("Tests that we do not crash when a Geolocation request is made from
a remote frame, which is then removed from the DOM in the error callback."); | |
| 2 | |
| 3 function gc() { | |
| 4 if (window.GCController) { | |
| 5 GCController.collect(); | |
| 6 return; | |
| 7 } | |
| 8 | |
| 9 for (var i = 0; i < 10000; i++) | |
| 10 new String(i); | |
| 11 } | |
| 12 | |
| 13 function onIframeReady() { | |
| 14 // Make request from remote frame | |
| 15 iframe.contentWindow.navigator.geolocation.getCurrentPosition(function() { | |
| 16 testFailed('Success callback invoked unexpectedly'); | |
| 17 finishJSTest(); | |
| 18 }, function() { | |
| 19 testPassed('Error callback invoked.'); | |
| 20 document.body.removeChild(iframe); | |
| 21 gc(); | |
| 22 finishJSTest(); | |
| 23 }); | |
| 24 } | |
| 25 | |
| 26 var iframe = document.createElement('iframe'); | |
| 27 iframe.src = 'resources/remove-remote-context-in-error-callback-crash-inner.html
'; | |
| 28 document.body.appendChild(iframe); | |
| 29 | |
| 30 window.jsTestIsAsync = true; | |
| OLD | NEW |