[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:32:24 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 8c8802b9a312b050d4423821f6ce56e129852ffe
Author: mnaganov at chromium.org <mnaganov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 21 15:00:08 2011 +0000
2011-01-21 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.
[Relanding, this time the test should work in Chromium]
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 229d935..aac66b6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-21 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-21 Csaba Osztrogonác <ossy at webkit.org>
Unreviewed.
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..d316aac
--- /dev/null
+++ b/LayoutTests/inspector/cpu-profiler-profiling.html
@@ -0,0 +1,63 @@
+<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("outer");
+ console.profileEnd("inner");
+}
+
+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();
+ InspectorTest.evaluateInConsole("pageFunction()", function done() {});
+}
+
+</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