Web Inspector: Execution line in selected call frame should keep showing after toggli...
authorvsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Oct 2011 11:49:18 +0000 (11:49 +0000)
committervsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Oct 2011 11:49:18 +0000 (11:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=70906

Reviewed by Yury Semikhatsky.

Source/WebCore:

Test: inspector/debugger/selected-call-frame-after-formatting-source.html

* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.setFormatSource):

LayoutTests:

* inspector/debugger/selected-call-frame-after-formatting-source-expected.txt: Added.
* inspector/debugger/selected-call-frame-after-formatting-source.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/inspector/debugger/selected-call-frame-after-formatting-source-expected.txt [new file with mode: 0644]
LayoutTests/inspector/debugger/selected-call-frame-after-formatting-source.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

index ad1854e622415360f739c56f3a64ad9d6303e5fc..0a53935760b6296bd43aadf62a7aa43eb533de37 100644 (file)
@@ -1,3 +1,13 @@
+2011-10-27  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Execution line in selected call frame should keep showing after toggling format source.
+        https://bugs.webkit.org/show_bug.cgi?id=70906
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/debugger/selected-call-frame-after-formatting-source-expected.txt: Added.
+        * inspector/debugger/selected-call-frame-after-formatting-source.html: Added.
+
 2011-10-27  Andrey Kosyakov  <caseq@chromium.org>
 
         Web Inspector: [Extensions API] add ignoreCache flag to options of inspectedWindow.reload()
 2011-10-27  Andrey Kosyakov  <caseq@chromium.org>
 
         Web Inspector: [Extensions API] add ignoreCache flag to options of inspectedWindow.reload()
diff --git a/LayoutTests/inspector/debugger/selected-call-frame-after-formatting-source-expected.txt b/LayoutTests/inspector/debugger/selected-call-frame-after-formatting-source-expected.txt
new file mode 100644 (file)
index 0000000..52dd922
--- /dev/null
@@ -0,0 +1,9 @@
+Tests selected call frame does not change when pretty-print is toggled.
+
+Bug 70906
+Debugger was enabled.
+Set timer for test function.
+Script execution paused.
+Script execution resumed.
+Debugger was disabled.
+
diff --git a/LayoutTests/inspector/debugger/selected-call-frame-after-formatting-source.html b/LayoutTests/inspector/debugger/selected-call-frame-after-formatting-source.html
new file mode 100644 (file)
index 0000000..419fd47
--- /dev/null
@@ -0,0 +1,53 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+<script src="../../http/tests/inspector/elements-test.js"></script>
+<script>
+function testFunction()
+{
+    return testFunction2();
+}
+
+function testFunction2()
+{
+    var x = Math.sqrt(10);
+    debugger;
+    return x;
+}
+
+var test = function()
+{
+    InspectorTest.startDebuggerTest(step1);
+    var panel = WebInspector.panels.scripts;
+
+    function step1()
+    {
+        var testName = WebInspector.mainResource.url;
+        testName = testName.substring(testName.lastIndexOf('/') + 1);
+        InspectorTest.showScriptSource(testName, step2);
+    }
+
+    function step2(callFrames)
+    {
+        InspectorTest.runTestFunctionAndWaitUntilPaused(step3);
+    }
+
+    function step3(callFrames)
+    {
+        WebInspector.debuggerPresentationModel.selectedCallFrame = WebInspector.debuggerPresentationModel._presentationCallFrames[1];
+        panel._toggleFormatSource();
+        InspectorTest.assertEquals("testFunction", WebInspector.debuggerPresentationModel.selectedCallFrame._callFrame.functionName);
+        panel._toggleFormatSource();
+        InspectorTest.assertEquals("testFunction", WebInspector.debuggerPresentationModel.selectedCallFrame._callFrame.functionName);
+        InspectorTest.completeDebuggerTest();
+    }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests selected call frame does not change when pretty-print is toggled.</p>
+<a href="https://bugs.webkit.org/show_bug.cgi?id=70906">Bug 70906</a>
+</body>
+</html>
index 1ff04a8a6cedd8168d9b5d3d9307784986ee27d0..8793036998b885ce58327d79b215a3fe6154ea2f 100644 (file)
@@ -1,3 +1,15 @@
+2011-10-27  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Execution line in selected call frame should keep showing after toggling format source.
+        https://bugs.webkit.org/show_bug.cgi?id=70906
+
+        Reviewed by Yury Semikhatsky.
+
+        Test: inspector/debugger/selected-call-frame-after-formatting-source.html
+
+        * inspector/front-end/DebuggerPresentationModel.js:
+        (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
+
 2011-10-27  Steve Block  <steveblock@google.com>
 
         Numerous debug build fixes
 2011-10-27  Steve Block  <steveblock@google.com>
 
         Numerous debug build fixes
index 1ba535af0c8ab51998ceeef2f74f77b5270bc830..d62fbc3d37ce71c2b226540a5e7f2da0eeddfc2a 100644 (file)
@@ -312,9 +312,6 @@ WebInspector.DebuggerPresentationModel.prototype = {
         this._breakpointManager.reset();
         for (var id in this._rawSourceCode)
             this._rawSourceCode[id].setFormatted(this._formatSource);
         this._breakpointManager.reset();
         for (var id in this._rawSourceCode)
             this._rawSourceCode[id].setFormatted(this._formatSource);
-
-        if (WebInspector.debuggerModel.callFrames)
-            this._debuggerPaused();
     },
 
     /**
     },
 
     /**