Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Range / range-created-during-remove-children.html
blobe21fc9e87ccbca899a8b6e34c426d3b0c9077e73
1 <div id="container">
2 <p id="description"></p>
3 <div id="sample"><span contenteditable="true">foobar</span></div>
4 </div>
5 <div id="console"></div>
6 <script src="../../../resources/js-test.js"></script>
7 <script>
8 description('Range objects should be updated after set innerHTML.');
10 function $(id) { return document.getElementById(id); }
12 var ranges = {};
13 function eventHandler(event) {
14 if (ranges[event.type])
15 return;
16 ranges[event.type] = document.createRange();
17 ranges[event.type].selectNodeContents(sample.firstChild.firstChild);
20 document.addEventListener('blur', eventHandler, true);
21 document.addEventListener('DOMNodeRemovedFromDocument', eventHandler, true);
23 $('sample').firstChild.focus();
24 $('sample').innerHTML = '';
26 shouldBe('ranges["blur"].startOffset', '0');
27 shouldBe('ranges["blur"].endOffset', '0');
28 shouldBe('ranges["DOMNodeRemovedFromDocument"].startOffset', '0');
29 shouldBe('ranges["DOMNodeRemovedFromDocument"].endOffset', '0');
31 if (window.testRunner)
32 $('container').outerHTML = '';
33 </script>