Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / insert-text-crash.html
blobe40d917d9d131d0496f64904724948e75923f188
1 <!DOCTYPE html>
2 <style>
3 span {
4 float: left !important;
5 width: 0;
7 table { float: none !important; }
8 span:first-letter { color: green; }
9 </style>
11 <script>
12 if (window.testRunner)
13 testRunner.dumpAsText();
15 var DOMNodeRemoved_active = false;
16 var iteration = 0;
17 function DOMNodeRemoved() {
18 if (DOMNodeRemoved_active) return ;
19 DOMNodeRemoved_active = true;
21 iteration += 1;
23 var oElement = event.srcElement;
24 oElement.insertAdjacentHTML('afterend', "<svg id='svg'></svg>");
25 oElement.contentEditable = "true";
27 var tref = document.createElementNS("http://www.w3.org/2000/svg", "tref")
28 tref.id = 'tref' + iteration;
29 oElement.appendChild(tref);
31 var oSelection = window.getSelection();
32 if (!oSelection.rangeCount) {
33 document.execCommand("SelectAll", false)
35 oSelection.collapseToStart();
37 var oRange = oSelection.getRangeAt(0);
38 if (iteration == 1)
39 var oParentElement = document.getElementById('table');
40 else if (iteration == 2)
41 var oParentElement = document.getElementById('button');
42 else if (iteration == 3)
43 var oParentElement = document.getElementById('tref2');
44 oRange.surroundContents(oParentElement);
46 document.execCommand('InsertText', false, 'a:ce#@::l');
48 DOMNodeRemoved_active = false;
50 document.addEventListener("DOMNodeRemoved", DOMNodeRemoved, true);
52 window.onload = function() {
53 document.designMode = "on";
55 var oElement = document.getElementById('col');
56 oElement.parentNode.replaceChild(document.createElementNS('http://www.w3.org/2000/svg', 'feSpecularLighting'), oElement);
58 document.execCommand('InsertOrderedList', false, false);
59 var oElement = document.getElementById('svg');
60 oElement.parentNode.replaceChild(document.createElementNS('http://www.w3.org/2000/svg', 'animateTransform'), oElement);
62 </script>
65 <button id='button'></button>
66 <hr />
67 <table id='table'>
68 <col id='col'></col>
69 </table>
70 Test passes if it does not CRASH.