blob: cff490bc8465a1b38629a55a3de06be9fd9a24d2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p id="description">This tests detaching a frame while clicking on an anchor element with ping attribute in the frame.<br>
WebKit should not crash.</p>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
var anchorElement = iframe.contentDocument.createElement('a');
anchorElement.setAttribute('href', 'javascript:parent.remove(event);');
anchorElement.setAttribute('ping', 'https://webkit.org/');
iframe.contentDocument.body.appendChild(anchorElement);
function remove(event) {
iframe.parentNode.removeChild(iframe);
event.preventDefault();
}
anchorElement.click();
document.write('PASS. WebKit did not crash.');
</script>
</body>
</html>