| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function populateConsoleWithMessages() | 6 function populateConsoleWithMessages() |
| 7 { | 7 { |
| 8 console.log("FIRST MATCH, SECOND MATCH"); | 8 console.log("FIRST MATCH, SECOND MATCH"); |
| 9 for (var i = 0; i < 200; ++i) | 9 for (var i = 0; i < 200; ++i) |
| 10 console.log("Message #" + i); | 10 console.log("Message #" + i); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 { | 133 { |
| 134 viewport.forceScrollItemToBeFirst(0); | 134 viewport.forceScrollItemToBeFirst(0); |
| 135 addResult("first visible message index: " + viewport.firstVisibleInd
ex()); | 135 addResult("first visible message index: " + viewport.firstVisibleInd
ex()); |
| 136 next(); | 136 next(); |
| 137 }, | 137 }, |
| 138 | 138 |
| 139 function testCanMarkCurrentMatch(next) | 139 function testCanMarkCurrentMatch(next) |
| 140 { | 140 { |
| 141 function addCurrentMarked() | 141 function addCurrentMarked() |
| 142 { | 142 { |
| 143 var matches = document.querySelectorAll(".highlighted-search-res
ult"); | 143 var matches = consoleView.element.querySelectorAll(".highlighted
-search-result"); |
| 144 addResult("number of visible matches: " + matches.length); | 144 addResult("number of visible matches: " + matches.length); |
| 145 for (var i = 0; i < matches.length; ++i) | 145 for (var i = 0; i < matches.length; ++i) |
| 146 addResult("match " + i + ": " + matches[i].className); | 146 addResult("match " + i + ": " + matches[i].className); |
| 147 } | 147 } |
| 148 | 148 |
| 149 setQuery("MATCH", false, false, function() { | 149 setQuery("MATCH", false, false, function() { |
| 150 // Find first match. | 150 // Find first match. |
| 151 consoleView._searchableView.handleFindNextShortcut(); | 151 consoleView._searchableView.handleFindNextShortcut(); |
| 152 addCurrentMarked(); | 152 addCurrentMarked(); |
| 153 | 153 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 ]); | 232 ]); |
| 233 } | 233 } |
| 234 </script> | 234 </script> |
| 235 </head> | 235 </head> |
| 236 <body onload="populateConsoleWithMessages()"> | 236 <body onload="populateConsoleWithMessages()"> |
| 237 <p> | 237 <p> |
| 238 Tests console search. | 238 Tests console search. |
| 239 </p> | 239 </p> |
| 240 </body> | 240 </body> |
| 241 </html> | 241 </html> |
| OLD | NEW |