<!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');
submit1.type = 'submit';
form1.addEventListener('submit', handleSubmit, false);
form1.action = 'javascript:gc()';
form1.appendChild(submit1);
document.body.appendChild(form1);
submit1.click();
testPassed('if not crashed.');
finishJSTest();
}
function handleSubmit() {
form1.removeChild(submit1);
form1 = null;
}
window.onload = start;
</script>
</body>