Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Range / insertNode-empty-fragment-crash.html
blob244581fe62020b880929f5d49a532513950c0094
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <script>
7 description('Test Range.insertNode(fragment) when the fragment is empty and the range is collapsed');
9 var p = document.createElement('p');
10 var t1 = document.createTextNode('12345');
11 p.appendChild(t1);
12 var t2 = document.createTextNode('ABCDE');
13 p.appendChild(t2);
14 document.body.appendChild(p);
15 var r = document.createRange();
16 r.setStart(p, 1);
17 r.setEnd(p, 1);
18 shouldBeEqualToString("r.toString()", "");
20 var df = document.createDocumentFragment();
21 r.insertNode(df);
23 shouldBe("p.childNodes.length", "2");
24 shouldBe("p.childNodes[0]", "t1");
25 shouldBe("p.childNodes[1]", "t2");
27 shouldBeTrue("r.collapsed");
28 shouldBe("r.startContainer", "p");
29 shouldBe("r.startOffset", "1");
30 shouldBe("r.endContainer", "p");
31 shouldBe("r.endOffset", "1");
32 shouldBeEqualToString("r.toString()", "")
34 document.body.removeChild(p);
35 </script>
36 </body>
37 </html>