Web Inspector: [REGRESSION] Copy Stack Trace is broken
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Feb 2012 08:24:05 +0000 (08:24 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Feb 2012 08:24:05 +0000 (08:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78583

Reviewed by Yury Semikhatsky.

Source/WebCore:

Test: inspector/debugger/copy-stack-trace.html

* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.prototype._copyStackTrace):

LayoutTests:

* inspector/debugger/copy-stack-trace-expected.txt: Added.
* inspector/debugger/copy-stack-trace.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/inspector/debugger/copy-stack-trace-expected.txt [new file with mode: 0644]
LayoutTests/inspector/debugger/copy-stack-trace.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/CallStackSidebarPane.js

index e12f9c6..e979172 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-14  Pavel Feldman  <pfeldman@chromium.org>
+
+        Web Inspector: [REGRESSION] Copy Stack Trace is broken
+        https://bugs.webkit.org/show_bug.cgi?id=78583
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/debugger/copy-stack-trace-expected.txt: Added.
+        * inspector/debugger/copy-stack-trace.html: Added.
+
 2012-02-14  Noel Gordon  <noel.gordon@gmail.com>
 
         [chromium] Rebaseline JPEG image results after r107389
diff --git a/LayoutTests/inspector/debugger/copy-stack-trace-expected.txt b/LayoutTests/inspector/debugger/copy-stack-trace-expected.txt
new file mode 100644 (file)
index 0000000..6a03ffe
--- /dev/null
@@ -0,0 +1,12 @@
+Tests that debugger will copy valid stack trace upon context menu action.
+
+Debugger was enabled.
+Set timer for test function.
+Script execution paused.
+functionBaz (copy-stack-trace.html:19)
+functionBar (copy-stack-trace.html:14)
+testFunction (copy-stack-trace.html:9)
+
+Script execution resumed.
+Debugger was disabled.
+
diff --git a/LayoutTests/inspector/debugger/copy-stack-trace.html b/LayoutTests/inspector/debugger/copy-stack-trace.html
new file mode 100644 (file)
index 0000000..e192f16
--- /dev/null
@@ -0,0 +1,48 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+function testFunction()
+{
+    functionBar();
+}
+
+function functionBar()
+{
+    functionBaz();
+}
+
+function functionBaz()
+{
+    debugger;
+}
+
+var test = function()
+{
+    InspectorTest.startDebuggerTest(step1);
+
+    function step1()
+    {
+        InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
+    }
+
+    function step2()
+    {
+        InspectorFrontendHost.copyText = InspectorTest.addResult.bind(InspectorTest);
+        WebInspector.panels.scripts.sidebarPanes.callstack._copyStackTrace();
+        InspectorTest.completeDebuggerTest();
+    }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests that debugger will copy valid stack trace upon context menu action.
+</p>
+
+</body>
+</html>
index de7c576..080df1a 100644 (file)
@@ -1,3 +1,15 @@
+2012-02-14  Pavel Feldman  <pfeldman@chromium.org>
+
+        Web Inspector: [REGRESSION] Copy Stack Trace is broken
+        https://bugs.webkit.org/show_bug.cgi?id=78583
+
+        Reviewed by Yury Semikhatsky.
+
+        Test: inspector/debugger/copy-stack-trace.html
+
+        * inspector/front-end/CallStackSidebarPane.js:
+        (WebInspector.CallStackSidebarPane.prototype._copyStackTrace):
+
 2012-02-14  Eric Seidel  <eric@webkit.org>
 
         Upstream Android's support for SK_B32_SHIFT to JPEGImageEncoder
index 6dd59cc..b2b3886 100644 (file)
@@ -126,7 +126,7 @@ WebInspector.CallStackSidebarPane.prototype = {
     {
         var text = "";
         for (var i = 0; i < this.placards.length; ++i)
-            text += this.placards[i]._text + "\n";
+            text += this.placards[i].title + " (" + this.placards[i].subtitle + ")\n";
         InspectorFrontendHost.copyText(text);
     },