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 for (var i = 0; i < 200; ++i) | 8 for (var i = 0; i < 200; ++i) |
9 console.log("Message #" + i); | 9 console.log("Message #" + i); |
10 console.log("LAST MESSAGE"); | 10 console.log("LAST MESSAGE"); |
(...skipping 11 matching lines...) Expand all Loading... |
22 // NOTE: keep in sync with populateConsoleWithMessages above. | 22 // NOTE: keep in sync with populateConsoleWithMessages above. |
23 const expectedMessageCount = 201; | 23 const expectedMessageCount = 201; |
24 InspectorTest.waitForConsoleMessages(expectedMessageCount, next); | 24 InspectorTest.waitForConsoleMessages(expectedMessageCount, next); |
25 }, | 25 }, |
26 | 26 |
27 function verifyViewportIsTallEnough(next) | 27 function verifyViewportIsTallEnough(next) |
28 { | 28 { |
29 viewport.invalidate(); | 29 viewport.invalidate(); |
30 var viewportMessagesCount = viewport._lastVisibleIndex - viewport._f
irstVisibleIndex; | 30 var viewportMessagesCount = viewport._lastVisibleIndex - viewport._f
irstVisibleIndex; |
31 if (viewportMessagesCount > maximumViewportMessagesCount) { | 31 if (viewportMessagesCount > maximumViewportMessagesCount) { |
32 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)); | 32 InspectorTest.addResult(String.sprintf("Test cannot be run becau
se viewport could fit %d messages which is more than maximum of %d.", viewportMe
ssagesCount, maximumViewportMessagesCount)); |
33 InspectorTest.completeTest(); | 33 InspectorTest.completeTest(); |
34 return; | 34 return; |
35 } | 35 } |
36 next(); | 36 next(); |
37 }, | 37 }, |
38 | 38 |
39 function scrollConsoleToTop(next) | 39 function scrollConsoleToTop(next) |
40 { | 40 { |
41 viewport.forceScrollItemToBeFirst(0); | 41 viewport.forceScrollItemToBeFirst(0); |
42 dumpTop(); | 42 dumpTop(); |
(...skipping 28 matching lines...) Expand all Loading... |
71 } | 71 } |
72 } | 72 } |
73 </script> | 73 </script> |
74 </head> | 74 </head> |
75 <body onload="populateConsoleWithMessages()"> | 75 <body onload="populateConsoleWithMessages()"> |
76 <p> | 76 <p> |
77 Tests that console viewport reveals messages on searching. | 77 Tests that console viewport reveals messages on searching. |
78 </p> | 78 </p> |
79 </body> | 79 </body> |
80 </html> | 80 </html> |
OLD | NEW |