Web Inspector: UI performance test for logging 100 messages to the console.
[WebKit-https.git] / LayoutTests / inspector / performance / resources / console-append-100-lines.html
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="performance-test.js"></script>
5 <script>
6
7 function makeConsoleEvents(count)
8 {
9     for (var i = 0; i < count; ++i)
10         console.log("Console log: " + i);
11 }
12
13 function test()
14 {
15     WebInspector.showPanel("console");
16
17     function test(timer)
18     {
19         WebInspector.console.clearMessages();
20         InspectorTest.addSniffer(WebInspector.consoleView.promptElement, "scrollIntoView", finish);
21         cookie = timer.start("console-append-100-lines");
22
23         InspectorTest.evaluateInPage("makeConsoleEvents(100)");
24
25         function finish()
26         {
27             timer.finish(cookie);
28             timer.done();
29         }
30     }
31
32     InspectorTest.runPerformanceTest(test, 10000);
33 }
34
35 if (!window.layoutTestController) {
36     setTimeout(function() {
37         makeConsoleEvents(100);
38     }, 3000);
39 }
40
41 </script>
42 </head>
43
44 <body onload="runTest()">
45 </body>
46 </html>