Web Inspector: generic performance UI test for panel switch.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2011 16:31:46 +0000 (16:31 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2011 16:31:46 +0000 (16:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68806

Reviewed by Pavel Feldman.

* inspector/performance/resources/show-panel-elements.html: Removed.
* inspector/performance/resources/show-panel-network.html: Removed.
* inspector/performance/resources/show-panel.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/inspector/performance/resources/show-panel-elements.html [deleted file]
LayoutTests/inspector/performance/resources/show-panel-network.html [deleted file]
LayoutTests/inspector/performance/resources/show-panel.html [new file with mode: 0644]

index d8c288b..0d3e55c 100644 (file)
@@ -1,3 +1,14 @@
+2011-09-26  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: generic performance UI test for panel switch.
+        https://bugs.webkit.org/show_bug.cgi?id=68806
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/performance/resources/show-panel-elements.html: Removed.
+        * inspector/performance/resources/show-panel-network.html: Removed.
+        * inspector/performance/resources/show-panel.html: Added.
+
 2011-09-26  Zsolt FehĂ©r  <feherzs@inf.u-szeged.hu>
 
         Unreviewed Qt gardening.
diff --git a/LayoutTests/inspector/performance/resources/show-panel-elements.html b/LayoutTests/inspector/performance/resources/show-panel-elements.html
deleted file mode 100644 (file)
index fe8109e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="performance-test.js"></script>
-<script>
-
-function test()
-{
-    WebInspector.showPanel("audits");
-
-    function test(timer)
-    {
-        WebInspector.showPanel("audits");
-        var timerCookie = timer.start("show-elements-panel");
-        WebInspector.showPanel("elements");
-        timer.finish(timerCookie);
-        timer.done();
-    }
-
-    InspectorTest.runPerformanceTest(test, 5000);
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-
-<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
-<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
-<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
-<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
-<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
-<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
-
-</body>
-</body>
-</html>
diff --git a/LayoutTests/inspector/performance/resources/show-panel-network.html b/LayoutTests/inspector/performance/resources/show-panel-network.html
deleted file mode 100644 (file)
index fa45a04..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
-<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="performance-test.js"></script>
-<script>
-
-function makeXHRRequests(count)
-{
-    for (var i = 0; i < count; ++i) {
-        var xhr = new XMLHttpRequest();
-        xhr.open("GET", document.url, true);
-        xhr.send();
-    }
-}
-
-
-function test()
-{
-    WebInspector.showPanel("network");
-    InspectorTest.evaluateInPage("makeXHRRequests(30)", step1);
-
-    function step1()
-    {
-        function perfTest1(timer)
-        {
-            WebInspector.showPanel("audits");
-            var timerCookie = timer.start("show-network-panel");
-            WebInspector.showPanel("network");
-            timer.finish(timerCookie);
-            timer.done();
-        }
-
-        InspectorTest.runPerformanceTest(perfTest1, 5000);
-    }
-}
-
-if (!window.layoutTestController) {
-    setTimeout(function() {
-        makeXHRRequests(700);
-    }, 3000);
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-</body>
-</html>
diff --git a/LayoutTests/inspector/performance/resources/show-panel.html b/LayoutTests/inspector/performance/resources/show-panel.html
new file mode 100644 (file)
index 0000000..dbad1e3
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="performance-test.js"></script>
+<script>
+
+function test()
+{
+    WebInspector.showPanel("audits");
+
+    InspectorTest.runPerformanceTest(perfTest, 10000);
+    function perfTest(timer)
+    {
+        WebInspector.showPanel("audits");
+        for (var panelName in WebInspector.panels) {
+            var timerCookie = timer.start("show-panel-" + panelName);
+            WebInspector.showPanel(panelName);
+            layoutTestController.display();
+            timer.finish(timerCookie);
+        }
+        timer.done();
+    }
+}
+</script>
+</head>
+
+<body onload="runTest()">
+</body>
+</html>