blob: e23b3a59eac93168c0089c6ecad2c99b0e4b3a7b [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<iframe></iframe>
<script>
description('Should not crash if iframe\'s document element\'s focusout event handler removes the iframe in the parent document.');
window.jsTestIsAsync = true;
function run()
{
var iframe = document.getElementsByTagName('iframe')[0];
iframe.contentDocument.documentElement.contentEditable = true;
iframe.contentDocument.documentElement.addEventListener('focusout', function () {
iframe.parentNode.removeChild(iframe);
}, false);
iframe.contentDocument.documentElement.focus();
testPassed('Did not crash.');
window.finishJSTest();
}
document.addEventListener('DOMContentLoaded', run);
</script>
</body>
</html>