2011-04-29 Sheriff Bot <webkit.review.bot@gmail.com>
authorpodivilov@chromium.org <podivilov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2011 12:21:39 +0000 (12:21 +0000)
committerpodivilov@chromium.org <podivilov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2011 12:21:39 +0000 (12:21 +0000)
        Unreviewed, rolling out r85315.
        http://trac.webkit.org/changeset/85315
        https://bugs.webkit.org/show_bug.cgi?id=59792

        Broke script-formatter.html test (Requested by podivilov on
        #webkit).

        * http/tests/inspector/inspector-test.js:
        (initialize_InspectorTest.InspectorTest.reloadPage):
        (initialize_InspectorTest.InspectorTest.pageReloaded):
        (initialize_InspectorTest.InspectorTest.runWhenPageLoads):
        ():
        * inspector/debugger/script-formatter-expected.txt:
        * inspector/debugger/script-formatter.html:
2011-04-29  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r85315.
        http://trac.webkit.org/changeset/85315
        https://bugs.webkit.org/show_bug.cgi?id=59792

        Broke script-formatter.html test (Requested by podivilov on
        #webkit).

        * inspector/front-end/DebuggerPresentationModel.js:
        (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles):
        (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger.didRemoveBreakpoint):
        (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
        (WebInspector.PresentationBreakpoint.prototype.serialize):
        * inspector/front-end/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.optionCompare):
        (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
        (WebInspector.ScriptsPanel.prototype.reset):

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

LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/inspector-test.js
LayoutTests/inspector/debugger/script-formatter-expected.txt
LayoutTests/inspector/debugger/script-formatter.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DebuggerPresentationModel.js
Source/WebCore/inspector/front-end/ScriptsPanel.js

index 2b5678d..75e5c57 100644 (file)
@@ -1,3 +1,20 @@
+2011-04-29  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r85315.
+        http://trac.webkit.org/changeset/85315
+        https://bugs.webkit.org/show_bug.cgi?id=59792
+
+        Broke script-formatter.html test (Requested by podivilov on
+        #webkit).
+
+        * http/tests/inspector/inspector-test.js:
+        (initialize_InspectorTest.InspectorTest.reloadPage):
+        (initialize_InspectorTest.InspectorTest.pageReloaded):
+        (initialize_InspectorTest.InspectorTest.runWhenPageLoads):
+        ():
+        * inspector/debugger/script-formatter-expected.txt:
+        * inspector/debugger/script-formatter.html:
+
 2011-04-29  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Reviewed by Pavel Feldman.
index 8ae056a..9d016f3 100644 (file)
@@ -150,45 +150,36 @@ InspectorTest.assertGreaterOrEqual = function(expected, actual, message)
         InspectorTest.addResult("FAILED: " + (message ? message + ": " : "") + actual + " < " + expected);
 }
 
-InspectorTest.navigate = function(url, callback)
-{
-    InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback);
-
-    if (WebInspector.panels.network)
-        WebInspector.panels.network._reset();
-    InspectorTest.evaluateInConsole("window.location = '" + url + "'");
-}
-
 InspectorTest.reloadPage = function(callback)
 {
-    InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback);
+    InspectorTest._reloadPageCallback = InspectorTest.safeWrap(callback);
 
     if (WebInspector.panels.network)
         WebInspector.panels.network._reset();
     PageAgent.reload(false);
 }
 
-InspectorTest.pageLoaded = function()
+InspectorTest.pageReloaded = function()
 {
     resultsSynchronized = false;
     InspectorTest.addResult("Page reloaded.");
-    if (InspectorTest._pageLoadedCallback) {
-        var callback = InspectorTest._pageLoadedCallback;
-        delete InspectorTest._pageLoadedCallback;
+    if (InspectorTest._reloadPageCallback) {
+        var callback = InspectorTest._reloadPageCallback;
+        delete InspectorTest._reloadPageCallback;
         callback();
     }
 }
 
 InspectorTest.runWhenPageLoads = function(callback)
 {
-    var oldCallback = InspectorTest._pageLoadedCallback;
+    var oldCallback = InspectorTest._reloadPageCallback;
     function chainedCallback()
     {
         if (oldCallback)
             oldCallback();
         callback();
     }
-    InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(chainedCallback);
+    InspectorTest._reloadPageCallback = InspectorTest.safeWrap(chainedCallback);
 }
 
 InspectorTest.runAfterPendingDispatches = function(callback)
@@ -350,7 +341,7 @@ function runTest(enableWatchDogWhileDebugging)
     function runTestInFrontend(initializationFunctions, testFunction, completeTestCallId)
     {
         if (window.InspectorTest) {
-            InspectorTest.pageLoaded();
+            InspectorTest.pageReloaded();
             return;
         }
 
index c4c48ee..188bb36 100644 (file)
@@ -14,21 +14,5 @@ function f() {
 function g() {
 }
 </script></body></html>
-
-Running: testBreakpointsInOriginalAndFormattedSource
-Script execution paused.
-Call stack:
-    0) f1 (script-formatter.html:12)
-    1)  (script-formatter.html:1)
-Script execution resumed.
-Page reloaded.
-Navigated to test-navigation.html
-Page reloaded.
-Navigated back to test page.
-Script execution paused.
-Call stack:
-    0) f2 (script-formatter.html:17)
-    1)  (script-formatter.html:1)
-Script execution resumed.
 Debugger was disabled.
 
index 05fb49f..f8e7986 100644 (file)
@@ -6,22 +6,8 @@
 
 <script>
 
-function f1()
-{
-    var a=0;var b=1;var c=3;var d=4;var e=5;
-    var f=0;
-    return 0;
-}
-
-function f2()
-{
-    var x = 0;
-    return 0;
-}
-
 var test = function()
 {
-    var panel = WebInspector.panels.scripts;
     var worker = new Worker("ScriptFormatterWorker.js");
 
     InspectorTest.runDebuggerTestSuite([
@@ -98,65 +84,6 @@ var test = function()
 
             var content = "<html><body><script>function f(){}<" + "/script><script>function g(){}<" + "/script></body></html>";
             worker.postMessage({ mimeType: "text/html", content: content });
-        },
-
-        function testBreakpointsInOriginalAndFormattedSource(next)
-        {
-            var root;
-            InspectorTest.showScriptSource("script-formatter.html", didShowScriptSource);
-
-            function didShowScriptSource(sourceFrame)
-            {
-                root = sourceFrame._url.substr(0, sourceFrame._url.lastIndexOf("/") + 1);
-                InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
-                InspectorTest.waitUntilPaused(pausedInF1);
-                InspectorTest.evaluateInPageWithTimeout("f1()");
-            }
-
-            function pausedInF1(callFrames)
-            {
-                InspectorTest.captureStackTrace(callFrames);
-                InspectorTest.resumeExecution(resumed);
-            }
-
-            function resumed()
-            {
-                InspectorTest.navigate(root + "resources/test-navigation.html", didNavigateAnotherPage);
-            }
-
-            function didNavigateAnotherPage()
-            {
-                InspectorTest.addResult("Navigated to test-navigation.html");
-                panel._toggleFormatSourceFiles();
-                InspectorTest.showScriptSource("test-navigation.html", didShowAnotherPage);
-            }
-
-            function didShowAnotherPage(sourceFrame)
-            {
-                InspectorTest.navigate(root + "script-formatter.html", didNavigateBack);
-            }
-
-            function didNavigateBack()
-            {
-                InspectorTest.addResult("Navigated back to test page.");
-                InspectorTest.showScriptSource("script-formatter.html", didShowFormattedScriptSource);
-            }
-
-            function didShowFormattedScriptSource(sourceFrame)
-            {
-                // There should be no breakpoint in f1 since script is pretty-printed now.
-                InspectorTest.evaluateInPageWithTimeout("f1()");
-
-                InspectorTest.setBreakpoint(panel.visibleView, 24, "", true);
-                InspectorTest.waitUntilPaused(pausedInF2);
-                InspectorTest.evaluateInPageWithTimeout("f2()");
-            }
-
-            function pausedInF2(callFrames)
-            {
-                InspectorTest.captureStackTrace(callFrames);
-                next();
-            }
         }
     ]);
 }
index 206d5c8..c21e5ec 100644 (file)
@@ -1,3 +1,22 @@
+2011-04-29  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r85315.
+        http://trac.webkit.org/changeset/85315
+        https://bugs.webkit.org/show_bug.cgi?id=59792
+
+        Broke script-formatter.html test (Requested by podivilov on
+        #webkit).
+
+        * inspector/front-end/DebuggerPresentationModel.js:
+        (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles):
+        (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger.didRemoveBreakpoint):
+        (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
+        (WebInspector.PresentationBreakpoint.prototype.serialize):
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.optionCompare):
+        (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
+        (WebInspector.ScriptsPanel.prototype.reset):
+
 2011-04-29  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Reviewed by Pavel Feldman.
index 77cbe27..2cef23d 100644 (file)
@@ -210,12 +210,6 @@ WebInspector.DebuggerPresentationModel.prototype = {
                 this._removeBreakpointFromDebugger(sourceFile.breakpoints[line]);
         }
 
-        for (var id in this._breakpointsWithoutSourceFile) {
-            var breakpoints = this._breakpointsWithoutSourceFile[id];
-            for (var i = 0; i < breakpoints.length; ++i)
-                this._removeBreakpointFromDebugger(breakpoints[i]);
-        }
-
         var messages = this._messages;
         this._reset();
 
@@ -336,13 +330,19 @@ WebInspector.DebuggerPresentationModel.prototype = {
 
     _removeBreakpointFromDebugger: function(breakpoint, callback)
     {
-        if ("debuggerId" in breakpoint) {
-            WebInspector.debuggerModel.removeBreakpoint(breakpoint.debuggerId);
-            this._unbindDebuggerId(breakpoint);
+        if (!("debuggerId" in breakpoint)) {
+            if (callback)
+                callback();
+            return;
         }
 
-        if (callback)
-            callback();
+        function didRemoveBreakpoint()
+        {
+            this._unbindDebuggerId(breakpoint);
+            if (callback)
+                callback();
+        }
+        WebInspector.debuggerModel.removeBreakpoint(breakpoint.debuggerId, didRemoveBreakpoint.bind(this));
     },
 
     _bindDebuggerId: function(breakpoint, debuggerId)
@@ -631,8 +631,7 @@ WebInspector.PresentationBreakpoint.prototype = {
         serializedBreakpoint.lineNumber = this.lineNumber;
         serializedBreakpoint.condition = this.condition;
         serializedBreakpoint.enabled = this.enabled;
-        if ("debuggerId" in this)
-            serializedBreakpoint.debuggerId = this.debuggerId;
+        serializedBreakpoint.debuggerId = this.debuggerId;
         return serializedBreakpoint;
     }
 }
index a0a8571..b0da639 100644 (file)
@@ -295,9 +295,9 @@ WebInspector.ScriptsPanel.prototype = {
                 return a.isContentScript ? 1 : -1;
 
             if (a.isContentScript && !b.isContentScript)
-                return 1;
+                return 1; 
             if (!a.isContentScript && b.isContentScript)
-                return -1;
+                return -1; 
 
             if (a.text === b.text)
                 return 0;
@@ -479,11 +479,6 @@ WebInspector.ScriptsPanel.prototype = {
         this._currentBackForwardIndex = -1;
         this._updateBackAndForwardButtons();
 
-        for (var id in this._sourceFileIdToSourceFrame) {
-            var sourceFrame = this._sourceFileIdToSourceFrame[id];
-            sourceFrame.removeEventListener(WebInspector.SourceFrame.Events.Loaded, this._sourceFrameLoaded, this);
-        }
-
         this._sourceFileIdToSourceFrame = {};
         this._sourceFileIdToFilesSelectOption = {};
         this._filesSelectElement.removeChildren();