6 .collapse { visibility:collapse; }
10 if (window
.testRunner
) {
11 window
.testRunner
.dumpAsText();
12 window
.testRunner
.waitUntilDone();
15 document
.designMode
= "on";
16 var scriptElements
= document
.getElementsByTagName("script");
17 scriptElements
[0].parentNode
.removeChild(scriptElements
[0]);
18 var eventHandlerActive
= false;
20 function event_handler_webkitEditableContentChanged() {
21 if (eventHandlerActive
)
23 eventHandlerActive
= true;
24 var srcElement
= event
.srcElement
;
25 document
.execCommand('InsertText',false,'dummy text');
26 srcElement
.textContent
= "Pass. Test didn't crash.";
27 eventHandlerActive
= false;
28 if (window
.testRunner
)
29 window
.testRunner
.notifyDone();
32 document
.addEventListener("webkitEditableContentChanged", event_handler_webkitEditableContentChanged
, true);
34 function event_handler_DOMCharacterDataModified() {
35 document
.execCommand('InsertParagraph',false,false);
38 document
.addEventListener("DOMCharacterDataModified", event_handler_DOMCharacterDataModified
, false);
40 window
.addEventListener("load", function() {
41 var selection
=window
.getSelection();
42 document
.execCommand("SelectAll", false)
43 var range
= selection
.getRangeAt(0);
44 var documentFragment
= range
.extractContents();
45 document
.execCommand('Undo',false);
50 <table class=
"collapse">