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

Side by Side Diff: LayoutTests/inspector/console/console-search-reveals-messages.html

Issue 354013002: DevTools: [Console] fix search to reveal matched messages (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline one more test Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-search-reveals-messages-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 for (var i = 0; i < 200; ++i)
9 console.log("Message #" + i);
10 console.log("LAST MESSAGE");
11 runTest();
12 }
13
14 function test()
15 {
16 var consoleView = WebInspector.ConsolePanel._view();
17 var viewport = consoleView._viewport;
18 const maximumViewportMessagesCount = 150;
19 InspectorTest.runTestSuite([
20 function verifyViewportIsTallEnough(next)
21 {
22 viewport.invalidate();
23 var viewportMessagesCount = viewport._lastVisibleIndex - viewport._f irstVisibleIndex;
24 if (viewportMessagesCount > maximumViewportMessagesCount) {
25 InspectorTest.addResult(String.sprintf("Test cannot be run becau se viewport could fit %d messages which is more then maxiumum of %d.", viewportM essagesCount, maximumViewportMessagesCount));
26 InspectorTest.completeTest();
27 return;
28 }
29 next();
30 },
31
32 function scrollConsoleToTop(next)
33 {
34 viewport.forceScrollItemToBeFirst(0);
35 viewport.refresh();
36 dumpTop();
37 next();
38 },
39
40 function testFindLastMessage(next)
41 {
42 consoleView._searchableView._searchInputElement.value = "LAST MESSAG E";
43 consoleView._searchableView.showSearchField();
44 consoleView._searchableView.handleFindNextShortcut();
45 dumpBottom();
46 next();
47 }
48 ]);
49
50 function dumpTop()
51 {
52 viewport.refresh();
53 InspectorTest.addResult("first visible message index: " + viewport.first VisibleIndex());
54 }
55
56 function dumpBottom()
57 {
58 viewport.refresh();
59 InspectorTest.addResult("last visible message index: " + viewport.lastVi sibleIndex());
60 }
61 }
62 </script>
63 </head>
64 <body onload="populateConsoleWithMessages()">
65 <p>
66 Tests that console viewport reveals messages on searching.
67 </p>
68 </body>
69 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-search-reveals-messages-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698