blob: 0562f4abe390e08fd16efe3d61fcd3a37e0d9499 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
.container {
height: 100px;
width: 100px;
overflow: scroll;
border: 1px solid black;
}
.contents {
height: 400px;
background-color: silver;
}
</style>
<script src="../../../../resources/js-test-pre.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest()
{
var iframe = document.querySelector('iframe');
var node = iframe.contentDocument.createElement('div');
node.className = 'container';
node.addEventListener('touchstart', function() { }, false);
node.addEventListener('gesturestart', function() { }, false);
var contents = iframe.contentDocument.createElement('div');
contents.className = 'contents';
node.appendChild(contents);
iframe.contentDocument.body.appendChild(node);
iframe.contentDocument.body.offsetWidth;
document.body.appendChild(node);
document.body.offsetWidth;
node.remove();
window.setTimeout(removeFrameAndGC, 0)
}
function removeFrameAndGC()
{
var iframe = document.querySelector('iframe');
iframe.remove();
iframe = undefined;
gc();
if (window.testRunner)
testRunner.notifyDone();
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
This test should not crash or assert.
<iframe srcdoc="<style>
.container {
height: 100px;
width: 100px;
overflow: scroll;
border: 1px solid black;
}
.contents {
height: 400px;
background-color: silver;
}
</style>"
></iframe>
</body>
</html>