diff options
author | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 09:36:26 +0000 |
---|---|---|
committer | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 09:36:26 +0000 |
commit | e2d1cbf8db3557eeb046059dad7114dac3687dc5 (patch) | |
tree | b6b1eb1c119d2e56933e2fe9cb474a53dad3489c /webkit | |
parent | 9c7121a41d8486aa45853fb3be3ebca91602316a (diff) | |
download | chromium_src-e2d1cbf8db3557eeb046059dad7114dac3687dc5.zip chromium_src-e2d1cbf8db3557eeb046059dad7114dac3687dc5.tar.gz chromium_src-e2d1cbf8db3557eeb046059dad7114dac3687dc5.tar.bz2 |
DevTools: enable scripts panel sanity test.
BUG=19858
Review URL: http://codereview.chromium.org/201014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/devtools/js/tests.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/webkit/glue/devtools/js/tests.js b/webkit/glue/devtools/js/tests.js index c995959..7ee57ee 100644 --- a/webkit/glue/devtools/js/tests.js +++ b/webkit/glue/devtools/js/tests.js @@ -344,9 +344,16 @@ TestSuite.prototype.testShowScriptsTab = function() { // 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.search(/debugger_test_page.html$/) != -1) { + 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); } @@ -359,7 +366,10 @@ TestSuite.prototype.testShowScriptsTab = function() { test.fail('No visible script view: ' + sourceURL); } - if (parsedDebuggerTestPageHtml) { + // 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 */); |