blob: 3e49e0083002d14317d2c8a13f8c76c00899381b [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>This tests removing an iframe while it is being focused. WebKit should not crash.</p>
<iframe></iframe>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var iframe = document.querySelector('iframe');
var doc = iframe.contentDocument;
var input = doc.createElement('input');
input.value = 'foo';
doc.body.appendChild(input);
input.addEventListener('blur', function() { iframe.remove(); });
input.focus();
iframe.focus();
document.write('PASS');
</script>
</body>
</html>