OLD | NEW |
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 Loading... |
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 Loading... |
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> |
OLD | NEW |