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

podivilov at chromium.org podivilov at chromium.org
Sun Feb 20 23:09:50 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 37dda3c58004228940af87708eb71aa961befb4e
Author: podivilov at chromium.org <podivilov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 18 14:09:35 2011 +0000

    2011-01-18  Pavel Podivilov  <podivilov at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: fix flaky debugger tests.
            https://bugs.webkit.org/show_bug.cgi?id=51320
    
            * http/tests/inspector/debugger-test2.js:
            (initialize_DebuggerTest.InspectorTest.setBreakpoint):
            (initialize_DebuggerTest.InspectorTest.showScriptSource):
            (initialize_DebuggerTest.InspectorTest._showScriptSource):
            * inspector/debugger-pause-on-breakpoint-expected.txt:
            * inspector/debugger-pause-on-breakpoint.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76020 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2082991..b6ba74f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-18  Pavel Podivilov  <podivilov at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: fix flaky debugger tests.
+        https://bugs.webkit.org/show_bug.cgi?id=51320
+
+        * http/tests/inspector/debugger-test2.js:
+        (initialize_DebuggerTest.InspectorTest.setBreakpoint):
+        (initialize_DebuggerTest.InspectorTest.showScriptSource):
+        (initialize_DebuggerTest.InspectorTest._showScriptSource):
+        * inspector/debugger-pause-on-breakpoint-expected.txt:
+        * inspector/debugger-pause-on-breakpoint.html:
+
 2011-01-18  Antti Koivisto  <antti at apple.com>
 
         Reviewed by Dave Hyatt.
diff --git a/LayoutTests/http/tests/inspector/debugger-test2.js b/LayoutTests/http/tests/inspector/debugger-test2.js
index b89d1b7..cd70cda 100644
--- a/LayoutTests/http/tests/inspector/debugger-test2.js
+++ b/LayoutTests/http/tests/inspector/debugger-test2.js
@@ -93,13 +93,8 @@ InspectorTest.captureStackTrace = function(callFrames)
 InspectorTest.setBreakpoint = function(url, lineNumber, enabled, condition, callback)
 {
     var scripts = WebInspector.debuggerModel.scriptsForURL(url);
-    if (scripts.length) {
-        WebInspector.debuggerModel.setBreakpoint(scripts[0].sourceID, lineNumber, enabled, condition);
-        callback();
-    } else {
-        var handler = InspectorTest.setBreakpoint.bind(InspectorTest, url, lineNumber, enabled, condition, callback);
-        InspectorTest._addSniffer(WebInspector.debuggerModel, "_parsedScriptSource", handler);
-    }
+    for (var i = 0; i < scripts.length; ++i)
+        WebInspector.debuggerModel.setBreakpoint(scripts[i].sourceID, lineNumber, enabled, condition);
 }
 
 InspectorTest._pausedScript = function(details)
@@ -126,10 +121,9 @@ InspectorTest._resumedScript = function()
 
 InspectorTest.showScriptSource = function(scriptName, callback)
 {
-    if (InspectorTest._scriptsAreParsed([scriptName])) {
-        var scriptOrResource = InspectorTest._showScriptSource(scriptName);
-        callback(scriptOrResource.sourceFrame);
-    } else
+    if (InspectorTest._scriptsAreParsed([scriptName]))
+        InspectorTest._showScriptSource(scriptName, callback);
+     else
         InspectorTest._addSniffer(WebInspector.debuggerModel, "_parsedScriptSource", InspectorTest.showScriptSource.bind(InspectorTest, scriptName, callback));
 };
 
@@ -174,7 +168,12 @@ InspectorTest._showScriptSource = function(scriptName, callback)
         scriptResource = options[pageScriptIndex].representedObject;
         scriptsPanel._showScriptOrResource(scriptResource);
     }
-    return scriptResource;
+
+    var sourceFrame = WebInspector.currentPanel.visibleView.sourceFrame;
+    if (sourceFrame._content)
+        callback(sourceFrame);
+    else
+        InspectorTest._addSniffer(sourceFrame._textModel, "setText", callback.bind(null, sourceFrame));
 };
 
 InspectorTest.expandProperties = function(properties, callback)
diff --git a/LayoutTests/inspector/debugger-breakpoints-not-activated-on-reload.html b/LayoutTests/inspector/debugger-breakpoints-not-activated-on-reload.html
index 2f98363..e70e71d 100644
--- a/LayoutTests/inspector/debugger-breakpoints-not-activated-on-reload.html
+++ b/LayoutTests/inspector/debugger-breakpoints-not-activated-on-reload.html
@@ -24,21 +24,17 @@ var test = function()
     function step2()
     {
         InspectorTest.addResult("Main resource was shown.");
-        InspectorTest.setBreakpoint(WebInspector.mainResource.url, 8, true, "", step3);
-    }
-
-    function step3()
-    {
+        InspectorTest.setBreakpoint(WebInspector.mainResource.url, 8, true, "");
         WebInspector.panels.scripts.toggleBreakpointsButton.element.click();
         InspectorTest.reloadPage(step4);
     }
 
-    function step4()
+    function step3()
     {
-        InspectorTest.showScriptSource(testName, step5);
+        InspectorTest.showScriptSource(testName, step4);
     }
 
-    function step5()
+    function step4()
     {
         InspectorTest.addResult("Main resource was shown.");
         if (!WebInspector.panels.scripts.breakpointsActivated)
diff --git a/LayoutTests/inspector/debugger-pause-on-breakpoint-expected.txt b/LayoutTests/inspector/debugger-pause-on-breakpoint-expected.txt
index ba3141a..9b9703c 100644
--- a/LayoutTests/inspector/debugger-pause-on-breakpoint-expected.txt
+++ b/LayoutTests/inspector/debugger-pause-on-breakpoint-expected.txt
@@ -1,6 +1,7 @@
 Tests that debugger will stop on breakpoint.
 
 Debugger was enabled.
+Script source was shown.
 Set timer for test function.
 Script execution paused.
 Call stack:
diff --git a/LayoutTests/inspector/debugger-pause-on-breakpoint.html b/LayoutTests/inspector/debugger-pause-on-breakpoint.html
index 0e0b9e0..43260b2 100644
--- a/LayoutTests/inspector/debugger-pause-on-breakpoint.html
+++ b/LayoutTests/inspector/debugger-pause-on-breakpoint.html
@@ -16,11 +16,13 @@ var test = function()
 
     function step1()
     {
-        InspectorTest.setBreakpoint(WebInspector.mainResource.url, 9, true, "", step2);
+        InspectorTest.showScriptSource("debugger-pause-on-breakpoint.html", step2);
     }
 
     function step2()
     {
+        InspectorTest.addResult("Script source was shown.");
+        InspectorTest.setBreakpoint(WebInspector.mainResource.url, 9, true, "");
         InspectorTest.runTestFunctionAndWaitUntilPaused(step3);
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list