From 081dd38bb69cb25d81007614f07eabcdcd442f1a Mon Sep 17 00:00:00 2001 From: "vsevik@chromium.org" Date: Wed, 4 Jul 2012 12:32:57 +0000 Subject: [PATCH] REGRESSION(r121792): inspector/extensions/extensions-resources.html fails https://bugs.webkit.org/show_bug.cgi?id=90530 Reviewed by Pavel Feldman. * http/tests/inspector/debugger-test.js: (initialize_DebuggerTest.InspectorTest.finishDebuggerTest.disableDebugger): (initialize_DebuggerTest.InspectorTest.finishDebuggerTest.debuggerDisabled): (initialize_DebuggerTest.InspectorTest.finishDebuggerTest): (initialize_DebuggerTest.InspectorTest.completeDebuggerTest.completeTest): (initialize_DebuggerTest.InspectorTest.completeDebuggerTest): * inspector/extensions/extensions-resources-expected.txt: * inspector/extensions/extensions-resources.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121842 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 16 ++++++++++++++++ LayoutTests/http/tests/inspector/debugger-test.js | 13 +++++++++---- .../extensions/extensions-resources-expected.txt | 6 ++++-- .../inspector/extensions/extensions-resources.html | 15 ++++++++++++--- LayoutTests/platform/qt/Skipped | 3 --- 5 files changed, 41 insertions(+), 12 deletions(-) diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index ac092a3..c693891 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,19 @@ +2012-07-04 Vsevolod Vlasov + + REGRESSION(r121792): inspector/extensions/extensions-resources.html fails + https://bugs.webkit.org/show_bug.cgi?id=90530 + + Reviewed by Pavel Feldman. + + * http/tests/inspector/debugger-test.js: + (initialize_DebuggerTest.InspectorTest.finishDebuggerTest.disableDebugger): + (initialize_DebuggerTest.InspectorTest.finishDebuggerTest.debuggerDisabled): + (initialize_DebuggerTest.InspectorTest.finishDebuggerTest): + (initialize_DebuggerTest.InspectorTest.completeDebuggerTest.completeTest): + (initialize_DebuggerTest.InspectorTest.completeDebuggerTest): + * inspector/extensions/extensions-resources-expected.txt: + * inspector/extensions/extensions-resources.html: + 2012-07-04 Zan Dobersek Unreviewed GTK gardening, updating baselines after r121789. diff --git a/LayoutTests/http/tests/inspector/debugger-test.js b/LayoutTests/http/tests/inspector/debugger-test.js index 6ddab3f..a7a6eb5 100644 --- a/LayoutTests/http/tests/inspector/debugger-test.js +++ b/LayoutTests/http/tests/inspector/debugger-test.js @@ -22,7 +22,7 @@ InspectorTest.startDebuggerTest = function(callback, quiet) } }; -InspectorTest.completeDebuggerTest = function() +InspectorTest.finishDebuggerTest = function(callback) { var scriptsPanel = WebInspector.panels.scripts; @@ -34,18 +34,23 @@ InspectorTest.completeDebuggerTest = function() if (!scriptsPanel._debuggerEnabled) completeTest(); else { - InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasDisabled", completeTest); + InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasDisabled", debuggerDisabled); scriptsPanel.toggleDebugging(false); } } - function completeTest() + function debuggerDisabled() { InspectorTest.addResult("Debugger was disabled."); - InspectorTest.completeTest(); + callback(); } }; +InspectorTest.completeDebuggerTest = function() +{ + InspectorTest.finishDebuggerTest(InspectorTest.completeTest.bind(InspectorTest)); +}; + InspectorTest.runDebuggerTestSuite = function(testSuite) { var testSuiteTests = testSuite.slice(); diff --git a/LayoutTests/inspector/extensions/extensions-resources-expected.txt b/LayoutTests/inspector/extensions/extensions-resources-expected.txt index 2e35ab9..7f87b22 100644 --- a/LayoutTests/inspector/extensions/extensions-resources-expected.txt +++ b/LayoutTests/inspector/extensions/extensions-resources-expected.txt @@ -1,4 +1,4 @@ -CONSOLE MESSAGE: line 11: don't panic! +CONSOLE MESSAGE: line 12: don't panic! Tests resource-related methods of WebInspector extension API @@ -60,6 +60,7 @@ log: Extension server error: Object does not support requested operation: Resour content committed for resource .../audits-style1.css (type: stylesheet), new content: div.test { width: 220px; height: 42px; } Revision content: div.test { width: 220px; height: 42px; } RUNNING TEST: extension_testOnResourceAdded +Debugger was enabled. resource added: { 0 : { @@ -69,6 +70,7 @@ resource added: setContent : } } +Debugger was disabled. RUNNING TEST: extension_testOpenResourceHandler handleOpenResource() invoked [this should only appear once!]: { @@ -78,7 +80,7 @@ handleOpenResource() invoked [this should only appear once!]: getContent : setContent : } - 1 : 11 + 1 : 12 } RUNNING TEST: extension_testSetResourceContent div.test width after stylesheet edited (should be 126): 126 diff --git a/LayoutTests/inspector/extensions/extensions-resources.html b/LayoutTests/inspector/extensions/extensions-resources.html index e34f937..7da6733 100644 --- a/LayoutTests/inspector/extensions/extensions-resources.html +++ b/LayoutTests/inspector/extensions/extensions-resources.html @@ -2,6 +2,7 @@ + @@ -158,16 +159,24 @@ function extension_testOnContentCommitted(nextTest) function extension_testOnResourceAdded(nextTest) { + evaluateOnFrontend("InspectorTest.startDebuggerTest(reply);", step2); + + function step2() + { + webInspector.inspectedWindow.onResourceAdded.addListener(onResourceAdded); + webInspector.inspectedWindow.eval("addResource()"); + } + function onResourceAdded(resource) { + if (resource.url.indexOf("test_func") === -1) + return; output("resource added:"); dumpObject(Array.prototype.slice.call(arguments), { url: "url" }); webInspector.inspectedWindow.onResourceAdded.removeListener(onResourceAdded); - nextTest(); + evaluateOnFrontend("InspectorTest.finishDebuggerTest(reply);", nextTest); } - webInspector.inspectedWindow.onResourceAdded.addListener(onResourceAdded); - webInspector.inspectedWindow.eval("addResource()"); } function extension_testOpenResourceHandler(nextTest) diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped index 52252fb..2e81bc4 100644 --- a/LayoutTests/platform/qt/Skipped +++ b/LayoutTests/platform/qt/Skipped @@ -2536,6 +2536,3 @@ fast/block/float/floats-wrap-inside-inline-003.htm # https://bugs.webkit.org/show_bug.cgi?id=90165 css3/filters/huge-region-composited.html -# REGRESSION(r121792): inspector/extensions/extensions-resources.html fails -# https://bugs.webkit.org/show_bug.cgi?id=90530 -inspector/extensions/extensions-resources.html -- 2.7.4