Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / platform / win / editing / execCommand / indent-pre-expected.txt
blobff09c29c2f3e8aed532db315f1f08de1104d8cd1
1 CONSOLE MESSAGE: line 48: Wrong focus offset: 5 instead of 4
2 CONSOLE MESSAGE: line 44: Wrong node selected.
3 CONSOLE MESSAGE: line 46: Wrong anchor offset: 8 instead of 0
4 CONSOLE MESSAGE: line 48: Wrong focus offset: 5 instead of 4
5 CONSOLE MESSAGE: line 41: Wrong end node type: [object HTMLBRElement]
6 CONSOLE MESSAGE: line 44: Wrong node selected.
7 | <html>
8 |   <head>
9 |   <body>
10 |     <p>
11 |       "This test tries to indent lines within pre tags.  This test passes if it
12 does not crash."
13 |     "
15 |     <div>
16 |       contenteditable=""
17 |       "
19 |       <blockquote>
20 |         style="margin: 0 0 0 40px; border: none; padding: 0px;"
21 |         <pre>
22 |           id="pre-basic"
23 |           "line one"
24 |       <pre>
25 |         id="pre-basic"
26 |         "line two
28 |       <blockquote>
29 |         style="margin: 0 0 0 40px; border: none; padding: 0px;"
30 |         <pre>
31 |           "line three"
32 |         <pre>
33 |           "line four"
34 |       "
37 |       <ul>
38 |         <li>
39 |           <pre>
40 |             id="pre-list"
41 |             "list one
43 |             <blockquote>
44 |               style="margin: 0 0 0 40px; border: none; padding: 0px;"
45 |               "list two"
46 |               <br>
47 |               "list three"
48 |             "list four
50 |       "
53 |       <table>
54 |         "
56 |         <tbody>
57 |           <tr>
58 |             <td>
59 |               <pre>
60 |                 id="pre-table"
61 |                 "table one<#selection-anchor>
63 |               <blockquote>
64 |                 style="margin: 0 0 0 40px; border: none; padding: 0px;"
65 |                 <pre>
66 |                   "table two"
67 |                 <pre>
68 |                   "table three<#selection-focus>"
69 |             <td>
70 |               "right cell"
71 |       "
74 |       <div>
75 |         id="results"
76 |         "PASSED (did not crash)"
77 |       "
79 |     "
82 |     <a>
83 |       href="javascript:document.execCommand('indent')"
84 |       "indent"
85 |     "
87 |     <a>
88 |       href="javascript:document.execCommand('outdent')"
89 |       "outdent"
90 |     "
92 |     <script>
93 |       src="../../resources/dump-as-markup.js"
94 |     "
96 |     <script>
97 |       src="../editing.js"
98 |     "
100 |     <script>
101 |       "
102 function setSelection(node)
104     var textNode = node.firstChild;
105     if (textNode.nodeType != Node.TEXT_NODE)
106         throw "Wrong node type: " + textNode;
107     execSetSelectionCommand(textNode, 0, 0);
110 function verifyTextSelection(startNode, startOffset, endNode, endOffset)
112     if (startNode.nodeType != Node.TEXT_NODE)
113         console.log("Wrong start node type: " + startNode);
114     if (endNode.nodeType != Node.TEXT_NODE)
115         console.log("Wrong end node type: " + endNode);
116     var sel = window.getSelection();
117     if (sel.anchorNode != startNode || sel.focusNode != endNode)
118         console.log("Wrong node selected.");
119     if (sel.anchorOffset != startOffset)
120         console.log("Wrong anchor offset: " + sel.anchorOffset + " instead of " + startOffset);
121     if (sel.focusOffset != endOffset)
122         console.log("Wrong focus offset: " + sel.focusOffset + " instead of " + endOffset);
125 // Indent a single line in a pre and make sure the selection is correctly preserved.
126 var pre = document.getElementById("pre-basic");
127 setSelection(pre);
128 execMoveSelectionForwardByCharacterCommand();
129 execExtendSelectionForwardByWordCommand();
130 document.execCommand("indent");
131 verifyTextSelection(document.getElementsByTagName("pre")[0].firstChild, 1,
132                     document.getElementsByTagName("pre")[0].firstChild, 4);
134 // Indent 2 lines.
135 setSelection(pre);
136 execMoveSelectionForwardByLineCommand();
137 execExtendSelectionForwardByLineCommand();
138 execExtendSelectionForwardByWordCommand();
139 document.execCommand("indent");
140 if (document.getElementsByTagName("pre").length > 3) {
141     // FIXME: The selection for the anchorNode is wrong.  It should stay at
142     // the beginning of "line three", but it moves to the end of "line 2".
143     verifyTextSelection(document.getElementsByTagName("pre")[2].firstChild, 0,
144                         document.getElementsByTagName("pre")[3].firstChild, 4);
145 } else {
146     console.log("Wrong number of pre nodes.");
149 // Indent <pre> lines in a list.
150 pre = document.getElementById("pre-list");
151 setSelection(pre);
152 execMoveSelectionForwardByLineCommand();
153 execExtendSelectionForwardByLineCommand();
154 execExtendSelectionForwardByLineCommand();
155 document.execCommand("indent");
156 verifyTextSelection(document.getElementsByTagName("blockquote")[2].firstChild, 0,
157                     document.getElementsByTagName("blockquote")[2].firstChild.nextSibling, 10);
158 // Indenting <pre> lines in a table.
159 pre = document.getElementById("pre-table");
160 setSelection(pre);
161 execMoveSelectionForwardByLineCommand();
162 execExtendSelectionForwardByLineCommand();
163 execExtendSelectionForwardByLineCommand();
164 // FIXME: This is wrong.  The pre tags get copied when they shouldn't be. 
165 // See https://bugs.webkit.org/show_bug.cgi?id=42009
166 document.execCommand("indent");
167 document.getElementById("results").innerText = "PASSED (did not crash)";
169 |     "