Web Inspector: UI performance test for Resource panel first open experience.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Sep 2011 14:06:45 +0000 (14:06 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Sep 2011 14:06:45 +0000 (14:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68527

Reviewed by Pavel Feldman.

* inspector/performance/resources/first-open-resources.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/inspector/performance/resources/first-open-resources.html [new file with mode: 0644]

index 5950bbdcbc0a1e607710cebe674761cd0b5a5030..59e366a9b7c51962feeac37f45f40a1c947c1a43 100644 (file)
@@ -1,3 +1,12 @@
+2011-09-21  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: UI performance test for Resource panel first open experience.
+        https://bugs.webkit.org/show_bug.cgi?id=68527
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/performance/resources/first-open-resources.html: Added.
+
 2011-09-21  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Web Inspector: extend UI perf tests coverage. Elements panel opens first time.
diff --git a/LayoutTests/inspector/performance/resources/first-open-resources.html b/LayoutTests/inspector/performance/resources/first-open-resources.html
new file mode 100644 (file)
index 0000000..6a536cd
--- /dev/null
@@ -0,0 +1,36 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="performance-test.js"></script>
+<script>
+
+function test()
+{
+    WebInspector.showPanel("resources");
+    WebInspector.settings.resourcesLastSelectedItem.set(WebInspector.mainResource._documentURL);
+
+    function test(timer)
+    {
+        WebInspector.showPanel("audits");
+
+        var showPanelTimerCookie = timer.start("resources-panel-show");
+        InspectorTest.addBackendResponseSniffer(PageAgent, "getResourceContent", function() {
+            timer.finish(showPanelTimerCookie);
+            timer.done();
+        });
+        WebInspector.panels.resources._resetResourcesTree();
+        WebInspector.resourceTreeModel.frontendReused();
+        WebInspector.showPanel("resources");
+    }
+
+    InspectorTest.runPerformanceTest(test, 5000);
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+</body>
+</body>
+</html>
+