blob: a596946916a1b6ac94d8715c9ecb56de0af3ae46 [file] [log] [blame]
<html>
<head>
<style>
#el0 { position: relative; }
#el2 { outline-style: dashed; }
</style>
<script>
if (window.testRunner) {
testRunner.displayAndTrackRepaints();
testRunner.waitUntilDone();
}
function log(message) {
var console = document.getElementById("console");
console.appendChild(document.createTextNode(message + "\n"));
}
function test() {
document.execCommand('removeformat');
setTimeout("finish()", 100);
}
function finish() {
if (window.testRunner) {
testRunner.dumpAsText();
log("PASSED: Didn't crash!\n");
testRunner.notifyDone();
}
}
// This tests a crash caused by stale pointers to continuations in a block's continuations table.
// https://bugs.webkit.org/show_bug.cgi?id=81276
function runTest() {
el0=document.createElement('span')
el0.setAttribute('id','el0')
document.body.appendChild(el0)
el1=document.createElement('div')
el0.appendChild(el1)
el1.appendChild(document.createElement('input'))
el0.appendChild(document.createTextNode('A'))
el2=document.createElement('q')
el2.setAttribute('id','el2')
document.body.appendChild(el2)
el2.appendChild(document.createElement('div'))
el2.appendChild(document.createElement('input'))
document.designMode='on'
document.execCommand('selectall')
document.execCommand('FormatBlock', false, '<'+'pre>')
document.execCommand('Undo')
setTimeout("test();",10)
}
</script>
</head>
<body onload="runTest();">
<div id="console"></div>
</body>
</html>