Skip to content

Instantly share code, notes, and snippets.

@VinsCool VinsCool/teastcrash
Created Feb 6, 2015

Embed
What would you like to do?
<html>
<script src="../../resources/js-test-pre.js"></script>
<body onload="runTest()">
<div id="console"></div>
<form id="form1" style="display:none" method="post" target="test" action="http://anything.com"></form>
<script>
if (window.testRunner)
{
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function runTest()
{
document.getElementById('form1').submit();
if (window.testRunner)
testRunner.notifyDone();
document.getElementById('console').innerHTML = 'PASS';
}
count = 0;
document.addEventListener("beforeload", function(event) {
event.preventDefault();
count = count + 1;
if (count == 2)
{
document.body.removeChild(document.getElementById('test'));
gc();
document.body.offsetTop;
}
}, true);
</script>
<iframe id="test" src="about:blank"></iframe>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.