Web Inspector: UI performance test for network panel is incorrect. The time is includ...
[WebKit-https.git] / LayoutTests / inspector / performance / resources / network-append-30-requests.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 makeXHRRequests(count)
8 {
9     for (var i = 0; i < count; ++i) {
10         var xhr = new XMLHttpRequest();
11         xhr.open("GET", document.URL, true);
12         xhr.send();
13     }
14 }
15
16 function test()
17 {
18     WebInspector.showPanel("network");
19
20     var originalRefresh = InspectorTest.override(WebInspector.panels.network._networkLogView, "refresh", timeTrackingRefresh, true);
21     WebInspector.panels.network._networkLogView._defaultRefreshDelay = 30;
22     function timeTrackingRefresh()
23     {
24         var cookie = InspectorTest.timer.start("network-append-30-requests");
25         originalRefresh.call(this);
26         InspectorTest.timer.finish(cookie);
27         InspectorTest.timer.done();
28     }
29
30     function test(timer)
31     {
32         WebInspector.panels.network._networkLogView._reset();
33         InspectorTest.evaluateInPage("makeXHRRequests(30)");
34     }
35
36     InspectorTest.runPerformanceTest(test, 15000);
37 }
38
39 if (!window.layoutTestController) {
40     setTimeout(function() {
41         makeXHRRequests(30);
42     }, 3000);
43 }
44
45 </script>
46 </head>
47
48 <body onload="runTest()">
49 </body>
50 </html>