Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | |
| 5 <script> | |
| 6 function populateConsoleWithMessages() | |
| 7 { | |
| 8 console.log("FIRST MATCH"); | |
| 9 console.log("SECOND MATCH"); | |
| 10 runTest(); | |
| 11 } | |
| 12 | |
| 13 function test() | |
| 14 { | |
| 15 function addResult(result) | |
| 16 { | |
| 17 viewport.refresh(); | |
| 18 InspectorTest.addResult(result); | |
| 19 } | |
| 20 | |
| 21 // Make sure to produce test output in case test times out | |
| 22 setTimeout(InspectorTest.completeTest.bind(InspectorTest), 2000); | |
|
lushnikov
2014/11/07 16:27:16
We do not commit these lines - just use them to de
aknudsen
2014/11/08 12:00:52
Ah OK.
aknudsen
2014/11/09 00:02:12
Done.
| |
| 23 | |
| 24 var consoleView = WebInspector.ConsolePanel._view(); | |
| 25 var viewport = consoleView._viewport; | |
| 26 InspectorTest.runTestSuite([ | |
| 27 function scrollConsoleToTop(next) | |
| 28 { | |
| 29 viewport.forceScrollItemToBeFirst(0); | |
| 30 addResult("first visible message index: " + viewport.firstVisibleInd ex()); | |
| 31 next(); | |
| 32 }, | |
| 33 | |
| 34 function testMarkCurrentMatch(next) | |
| 35 { | |
| 36 consoleView._searchableView._searchInputElement.value = "MATCH"; | |
| 37 consoleView._searchableView.showSearchField(); | |
| 38 | |
| 39 // Find first match | |
| 40 consoleView._searchableView.handleFindNextShortcut(); | |
| 41 addResult(InspectorTest.dumpConsoleMessagesIntoArray(false, true)); | |
| 42 | |
| 43 // Find second match | |
| 44 consoleView._searchableView.handleFindNextShortcut(); | |
| 45 addResult(InspectorTest.dumpConsoleMessagesIntoArray(false, true)); | |
| 46 } | |
|
lushnikov
2014/11/07 16:27:16
you don't call "next()" in the end of the function
aknudsen
2014/11/08 12:00:52
Acknowledged.
aknudsen
2014/11/09 00:02:12
Done.
| |
| 47 ]); | |
| 48 } | |
| 49 </script> | |
| 50 </head> | |
| 51 <body onload="populateConsoleWithMessages()"> | |
| 52 <p> | |
| 53 Tests that console can highlight the current search match. | |
| 54 </p> | |
| 55 </body> | |
| 56 </html> | |
| OLD | NEW |