Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / selection-after-split-text-node.html
blob5567019626b40fbb9a340631a1587351ec41e8ec
1 <div id="container">
2 <p id="description"></p>
3 <div id="sample">foobarbaz</div>
4 </div>
5 <script src="../../resources/js-test.js"></script>
6 <script>
7 description('Check selection updated after splitText.');
8 function $(id) { return document.getElementById(id); }
9 var range = document.createRange();
10 range.setStart($('sample').firstChild, 6);
11 range.setEnd($('sample').firstChild, $('sample').firstChild.length);
12 var selection = getSelection();
13 selection.removeAllRanges();
14 selection.addRange(range);
15 var newText = range.startContainer.splitText(3);
16 shouldBeEqualToString('selection.type', 'Range');
17 shouldBe('selection.anchorNode', 'newText');
18 shouldBe('selection.anchorOffset', '3');
19 shouldBe('selection.focusNode', 'newText');
20 shouldBe('selection.focusOffset', '6');
21 shouldBeEqualToString('selection.toString()', 'baz');
22 if (window.testRunner)
23 $('container').outerHTML = '';
24 </script>
25 <script src="../../resources/js-test.js"></script>