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

Side by Side Diff: LayoutTests/editing/spelling/grammar-paste.html

Issue 23514049: needsFocus is always undefined in grammar-paste.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5 <script src="resources/js-test-selection-shared.js"></script> 5 <script src="resources/js-test-selection-shared.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p id="description"></p> 8 <p id="description"></p>
9 <div id="console"></div> 9 <div id="console"></div>
10 <script> 10 <script>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return null; 68 return null;
69 } 69 }
70 70
71 71
72 if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement) 72 if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement)
73 return iterToFindFirstTextNode(internals.shadowRoot(node)); 73 return iterToFindFirstTextNode(internals.shadowRoot(node));
74 else 74 else
75 return iterToFindFirstTextNode(node); 75 return iterToFindFirstTextNode(node);
76 } 76 }
77 77
78 function verifyMarker(node, expectedMarked, needsFocus) 78 function verifyMarker(node, expectedMarked)
79 { 79 {
80 if (true) { 80 if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement)
81 if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElem ent) { 81 node.focus();
82 node.focus(); 82 else
83 } else { 83 sel.selectAllChildren(node);
84 sel.selectAllChildren(node);
85 }
86 }
87 84
88 var textNode = findFirstTextNode(node); 85 var textNode = findFirstTextNode(node);
89 var num = internals.markerCountForNode(textNode, "grammar"); 86 var num = internals.markerCountForNode(textNode, "grammar");
90 if (num != expectedMarked.length) 87 if (num != expectedMarked.length)
91 return false; 88 return false;
92 for (var i = 0; i < num; ++i) { 89 for (var i = 0; i < num; ++i) {
93 var range = internals.markerRangeForNode(textNode, "grammar", i); 90 var range = internals.markerRangeForNode(textNode, "grammar", i);
94 if (range.toString() != expectedMarked[i]) 91 if (range.toString() != expectedMarked[i])
95 return false; 92 return false;
96 } 93 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, ["an"] ); }); 146 tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, ["an"] ); });
150 tests.push(function() { pasteAndVerify(testSourceMulti, testTextArea, ["an", "an "]); }); 147 tests.push(function() { pasteAndVerify(testSourceMulti, testTextArea, ["an", "an "]); });
151 148
152 done(); 149 done();
153 150
154 var successfullyParsed = true; 151 var successfullyParsed = true;
155 </script> 152 </script>
156 <script src="../../fast/js/resources/js-test-post.js"></script> 153 <script src="../../fast/js/resources/js-test-post.js"></script>
157 </body> 154 </body>
158 </html> 155 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698