blob: 566b01f94397f337d12ec9adbc4f39556c608304 [file] [log] [blame]
<!DOCTYPE html>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
var af = [], i = 0;
var setIntervalId;
var done = false;
function main() {
if (done)
return;
if (i == 20 * af.length) {
done = true;
document.body.innerHTML += "<p>Test for crbug.com/338982. Passes if it does not crash</p>";
document.body.innerHTML += "<p>PASS</p>";
clearInterval(setIntervalId);
if (window.testRunner)
testRunner.notifyDone();
return;
}
af[i++ % af.length]();
}
af.push(function() {
document.designMode="on";
document.execCommand("SelectAll");
try {
window._Document_0 = document;
} catch(e) {
console.log(e)
};
});
af.push(function() {
document.execCommand("Underline", false);
});
af.push(function() {
try {
window._Selection_0 = window._Document_0.getSelection();
} catch(e) {
console.log(e)
};
});
af.push(function() {
document.execCommand("InsertParagraph");
});
af.push(function() {
try {
window._Selection_0.modify("move", "forward", "line");
} catch(e) {
console.log(e)
}
document.execCommand("Delete", false);
});
af.push(function() {
document.execCommand("Indent");
});
af.push(function() {
document.execCommand("InsertOrderedList");
document.execCommand("InsertImage", false);
});
af.push(function() {});
af.push(function() {});
af.push(function() {});
document.addEventListener("DOMNodeInserted", main, false);
setIntervalId = setInterval(main, 10);
</script>
<input>