Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/indent-pre-expected.txt

Issue 1778683005: Drop remaining [LegacyInterfaceTypeChecking] for Selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 CONSOLE MESSAGE: line 44: Wrong node selected. 1 CONSOLE MESSAGE: line 44: Wrong node selected.
2 CONSOLE MESSAGE: line 46: Wrong anchor offset: 8 instead of 0 2 CONSOLE MESSAGE: line 46: Wrong anchor offset: 8 instead of 0
3 CONSOLE MESSAGE: line 41: Wrong end node type: [object HTMLBRElement] 3 CONSOLE MESSAGE: line 41: Wrong end node type: [object HTMLBRElement]
4 CONSOLE MESSAGE: line 44: Wrong node selected. 4 CONSOLE MESSAGE: line 44: Wrong node selected.
5 | <html> 5 | <html>
6 | <head> 6 | <head>
7 | <body> 7 | <body>
8 | <p> 8 | <p>
9 | "This test tries to indent lines within pre tags. This test passes if i t 9 | "This test tries to indent lines within pre tags. This test passes if i t
10 does not crash." 10 does not crash."
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 | src="../editing.js" 95 | src="../editing.js"
96 | " 96 | "
97 " 97 "
98 | <script> 98 | <script>
99 | " 99 | "
100 function setSelection(node) 100 function setSelection(node)
101 { 101 {
102 var textNode = node.firstChild; 102 var textNode = node.firstChild;
103 if (textNode.nodeType != Node.TEXT_NODE) 103 if (textNode.nodeType != Node.TEXT_NODE)
104 throw "Wrong node type: " + textNode; 104 throw "Wrong node type: " + textNode;
105 execSetSelectionCommand(textNode, 0, 0); 105 execSetSelectionCommand(textNode, 0, textNode, 0);
106 } 106 }
107 107
108 function verifyTextSelection(startNode, startOffset, endNode, endOffset) 108 function verifyTextSelection(startNode, startOffset, endNode, endOffset)
109 { 109 {
110 if (startNode.nodeType != Node.TEXT_NODE) 110 if (startNode.nodeType != Node.TEXT_NODE)
111 console.log("Wrong start node type: " + startNode); 111 console.log("Wrong start node type: " + startNode);
112 if (endNode.nodeType != Node.TEXT_NODE) 112 if (endNode.nodeType != Node.TEXT_NODE)
113 console.log("Wrong end node type: " + endNode); 113 console.log("Wrong end node type: " + endNode);
114 var sel = window.getSelection(); 114 var sel = window.getSelection();
115 if (sel.anchorNode != startNode || sel.focusNode != endNode) 115 if (sel.anchorNode != startNode || sel.focusNode != endNode)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 execExtendSelectionForwardByLineCommand(); 152 execExtendSelectionForwardByLineCommand();
153 document.execCommand("indent"); 153 document.execCommand("indent");
154 verifyTextSelection(document.getElementsByTagName("blockquote")[2].firstChild, 0 , 154 verifyTextSelection(document.getElementsByTagName("blockquote")[2].firstChild, 0 ,
155 document.getElementsByTagName("blockquote")[2].firstChild.ne xtSibling, 10); 155 document.getElementsByTagName("blockquote")[2].firstChild.ne xtSibling, 10);
156 // Indenting <pre> lines in a table. 156 // Indenting <pre> lines in a table.
157 pre = document.getElementById("pre-table"); 157 pre = document.getElementById("pre-table");
158 setSelection(pre); 158 setSelection(pre);
159 execMoveSelectionForwardByLineCommand(); 159 execMoveSelectionForwardByLineCommand();
160 execExtendSelectionForwardByLineCommand(); 160 execExtendSelectionForwardByLineCommand();
161 execExtendSelectionForwardByLineCommand(); 161 execExtendSelectionForwardByLineCommand();
162 // FIXME: This is wrong. The pre tags get copied when they shouldn't be. 162 // FIXME: This is wrong. The pre tags get copied when they shouldn't be.
163 // See https://bugs.webkit.org/show_bug.cgi?id=42009 163 // See https://bugs.webkit.org/show_bug.cgi?id=42009
164 document.execCommand("indent"); 164 document.execCommand("indent");
165 document.getElementById("results").innerText = "PASSED (did not crash)"; 165 document.getElementById("results").innerText = "PASSED (did not crash)";
166 " 166 "
167 | " 167 | "
168 " 168 "
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698