blob: 9510501ec6cdebca66583002ce8f3518e7704379 [file] [log] [blame]
<!DOCTYPE html>
<script>
if (window.internals) {
internals.settings.setCSSStickyPositionEnabled(true);
}
</script>
<html>
<head>
<style>
body {
margin: 0;
height: 2000px;
}
.box {
width: 200px;
height: 200px;
}
.sticky {
position: sticky;
top: 100px;
background-color: green;
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function doTest()
{
var stickyBox = document.getElementById('sticky');
stickyBox.parentNode.removeChild(stickyBox);
window.scrollTo(0, 10);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<p>This test should not crash</p>
<div id="sticky" class="sticky box"></div>
</body>
</html>