blob: 5148c5e74321ff3ae384f76ceb23f20599179347 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<style>
* { display:block; }
.collapse { visibility:collapse; }
</style>
<script>
if (window.testRunner) {
window.testRunner.dumpAsText();
window.testRunner.waitUntilDone();
}
document.designMode = "on";
var scriptElements = document.getElementsByTagName("script");
scriptElements[0].parentNode.removeChild(scriptElements[0]);
var eventHandlerActive = false;
function event_handler_webkitEditableContentChanged() {
if (eventHandlerActive)
return;
eventHandlerActive = true;
var srcElement = event.srcElement;
document.execCommand('InsertText',false,'dummy text');
srcElement.textContent = "Pass. Test didn't crash.";
eventHandlerActive = false;
if (window.testRunner)
window.testRunner.notifyDone();
}
document.addEventListener("webkitEditableContentChanged", event_handler_webkitEditableContentChanged, true);
function event_handler_DOMCharacterDataModified() {
document.execCommand('InsertParagraph',false,false);
}
document.addEventListener("DOMCharacterDataModified", event_handler_DOMCharacterDataModified, false);
window.addEventListener("load", function() {
var selection=window.getSelection();
document.execCommand("SelectAll", false)
var range = selection.getRangeAt(0);
var documentFragment = range.extractContents();
document.execCommand('Undo',false);
});
</script>
</head>
<body>
<table class="collapse">
<caption>
original text
</caption>
</table>
</body>
</html>