3 testRunner
.dumpEditingCallbacks();
7 var li
= document
.createElement("li");
8 li
.appendChild(document
.createTextNode(str
));
9 var console
= document
.getElementById("console");
10 console
.appendChild(li
);
15 if (window
.testRunner
)
16 window
.testRunner
.dumpAsText();
18 var selection
= window
.getSelection();
19 var bodyElement
= document
.getElementById("test");
20 var htmlElement
= bodyElement
.parentNode
;
22 if (selection
.setBaseAndExtent
)
23 selection
.setBaseAndExtent(bodyElement
, 1, htmlElement
, 3);
25 throw("Couldn't set a selection.");
27 if (selection
.toString
) {
28 var string
= selection
.toString();
29 if (string
!= "\nbbbb")
30 throw("toString returned unexpected result");
33 throw("Selection::toString() not supported");
35 log("Test Failed. Error was: " + e
);
39 <body id=
"test" contenteditable
>aaaa
<object></object><div>bbbb
</div>
40 <ul id=
"console"></ul>
41 <script>runTest();</script>