blob: d44e8cbff96c0667eda54b3a1047f693a6a08389 [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
jsTestIsAsync = true;
var form1;
var submit1;
function start() {
form1 = document.createElement('form');
submit1 = document.createElement('input');
submit2 = document.createElement('input');
submit1.type = 'submit';
submit2.type = 'image';
form1.addEventListener('submit', handleSubmit, false);
form1.action = 'javascript:removeImage()';
form1.appendChild(submit1);
form1.appendChild(submit2);
submit1.click();
testPassed('if not crashed.');
finishJSTest();
}
function handleSubmit() {
form1.removeChild(submit1);
}
function removeImage() {
form1.removeChild(submit2);
submit2 = null;
gc();
}
window.onload = start;
</script>
</body>