diff options
-rw-r--r-- | chrome/browser/debugger/devtools_sanity_unittest.cc | 3 | ||||
-rw-r--r-- | webkit/glue/devtools/js/tests.js | 41 |
2 files changed, 7 insertions, 37 deletions
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc index a54aa40..bf7d9f9 100644 --- a/chrome/browser/debugger/devtools_sanity_unittest.cc +++ b/chrome/browser/debugger/devtools_sanity_unittest.cc @@ -298,8 +298,7 @@ IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { } // Tests scripts panel showing. -// TODO(yurys): Re-enable. http://crbugs.com/33107 -IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestShowScriptsTab) { +IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { RunTest("testShowScriptsTab", kDebuggerTestPage); } diff --git a/webkit/glue/devtools/js/tests.js b/webkit/glue/devtools/js/tests.js index b1ac60e..c9866281 100644 --- a/webkit/glue/devtools/js/tests.js +++ b/webkit/glue/devtools/js/tests.js @@ -439,42 +439,13 @@ TestSuite.prototype.testProfilerTab = function() { * Tests that scripts tab can be open and populated with inspected scripts. */ TestSuite.prototype.testShowScriptsTab = function() { - var parsedDebuggerTestPageHtml = false; - - // Intercept parsedScriptSource calls to check that all expected scripts are - // added to the debugger. - var test = this; - var receivedConsoleApiSource = false; - this.addSniffer(WebInspector, 'parsedScriptSource', - function(sourceID, sourceURL, source, startingLine) { - if (sourceURL == undefined) { - if (receivedConsoleApiSource) { - test.fail('Unexpected script without URL'); - } else { - receivedConsoleApiSource = true; - } - } else if (sourceURL.search(/debugger_test_page.html$/) != -1) { - if (parsedDebuggerTestPageHtml) { - test.fail('Unexpected parse event: ' + sourceURL); - } - parsedDebuggerTestPageHtml = true; - if (!WebInspector.panels.scripts.visibleView) { - test.fail('No visible script view: ' + sourceURL); - } - } else { - test.fail('Unexpected script URL: ' + sourceURL); - } - - // There should be two scripts: one for the main page and another - // one which is source of console API(see - // InjectedScript._ensureCommandLineAPIInstalled). - if (parsedDebuggerTestPageHtml && receivedConsoleApiSource) { - test.releaseControl(); - } - }, true /* sticky */); - this.showPanel('scripts'); - + var test = this; + // There should be at least main page script. + this._waitUntilScriptsAreParsed(['debugger_test_page.html$'], + function() { + test.releaseControl(); + }); // Wait until all scripts are added to the debugger. this.takeControl(); }; |