blob: 6e9e5e8e1802d1980e743f3468aa246e066132fb [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
#plugin {
position: absolute;
width: 100px;
height: 100px;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
// This gets called automatically from the test plugin.
var doingTest = false;
function setWindowCalled()
{
if (!doingTest)
return;
var victim = document.getElementById('victim');
victim.parentNode.removeChild(victim);
document.body.offsetTop;
if (window.testRunner)
testRunner.notifyDone();
}
function doTest()
{
doingTest = true;
document.getElementById('plugin').style.top = "120px";
document.body.offsetTop;
doingTest = false;
}
window.addEventListener('load', function() {
window.setTimeout(doTest, 0);
}, false);
</script>
</head>
<body>
<p>This test should not crash.</p>
<embed type="application/x-webkit-test-netscape"
onSetWindow="setWindowCalled()"
id="plugin">
<embed name="victim" type="application/x-webkit-test-netscape" id="victim">
</body>
</html>