[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

mnaganov at chromium.org mnaganov at chromium.org
Sun Feb 20 23:15:14 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 89065aef21411b68af89a8fa7ff41dfe14c54a6a
Author: mnaganov at chromium.org <mnaganov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 19 12:42:36 2011 +0000

    2011-01-18  Mikhail Naganov  <mnaganov at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: Add layout test for the CPU profiler.
    
            This test replaces DevToolsSanityTest.TestProfilerTab from
            Chromium's interactive_ui_tests.
    
            https://bugs.webkit.org/show_bug.cgi?id=52634
    
            * inspector/cpu-profiler-profiling-expected.txt: Added.
            * inspector/cpu-profiler-profiling.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76114 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9431759..80b8ad3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-18  Mikhail Naganov  <mnaganov at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: Add layout test for the CPU profiler.
+
+        This test replaces DevToolsSanityTest.TestProfilerTab from
+        Chromium's interactive_ui_tests.
+
+        https://bugs.webkit.org/show_bug.cgi?id=52634
+
+        * inspector/cpu-profiler-profiling-expected.txt: Added.
+        * inspector/cpu-profiler-profiling.html: Added.
+
 2011-01-18  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/LayoutTests/inspector/cpu-profiler-profiling-expected.txt b/LayoutTests/inspector/cpu-profiler-profiling-expected.txt
new file mode 100644
index 0000000..aaccc62
--- /dev/null
+++ b/LayoutTests/inspector/cpu-profiler-profiling-expected.txt
@@ -0,0 +1,4 @@
+Tests that CPU profiling works. Bug 52634.
+
+found pageFunction
+
diff --git a/LayoutTests/inspector/cpu-profiler-profiling.html b/LayoutTests/inspector/cpu-profiler-profiling.html
new file mode 100644
index 0000000..c0b0671
--- /dev/null
+++ b/LayoutTests/inspector/cpu-profiler-profiling.html
@@ -0,0 +1,67 @@
+<html>
+<head>
+  <script src="../http/tests/inspector/inspector-test2.js"></script>
+<script>
+
+function pageFunction() {
+    console.profile("outer");
+    console.profile("inner");  // [Chromium] Make sure we capture the current callstack.
+    console.profileEnd("inner");
+    console.profileEnd("outer");
+}
+
+function initialize_ProfilerTests()
+{
+    var oldAddProfileHeader = WebInspector.panels.profiles._addProfileHeader;
+    WebInspector.panels.profiles._addProfileHeader = function(profile)
+    {
+        oldAddProfileHeader.call(this, profile);
+        if (profile.title === "inner") {
+            this.showProfile(profile);
+        }
+    }
+
+    var oldRefresh = WebInspector.CPUProfileView.prototype.refresh;
+    WebInspector.CPUProfileView.prototype.refresh = function()
+    {
+        oldRefresh.call(this);
+        if (this.profile.title === "inner") {
+            var tree = this.profileDataGridTree;
+            if (!tree)
+                 InspectorTest.addResult("no tree");
+            var node = tree.children[0];
+            if (!node)
+                 InspectorTest.addResult("no node");
+            while (node) {
+                if (node.functionName.indexOf("pageFunction") !== -1) {
+                    InspectorTest.addResult("found pageFunction");
+                    break;
+                }
+                node = node.traverseNextNode(true, null, true);
+            }
+            InspectorTest.completeTest();
+        }
+    }
+}
+
+function test()
+{
+    WebInspector.showPanel("profiles");
+    WebInspector.panels.profiles._enableProfiling();
+    InspectorBackend.startProfiling();
+    InspectorTest.evaluateInConsole("pageFunction()", function done()
+    {
+        InspectorBackend.stopProfiling();
+    });
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Tests that CPU profiling works.
+
+<a href="https://bugs.webkit.org/show_bug.cgi?id=52634">Bug 52634.</a>
+</p>
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list