summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authoryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 08:40:39 +0000
committeryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 08:40:39 +0000
commit10f9436f16c972adaee0e4d9f8e4fe40a91de843 (patch)
tree86a31d7cbff7a9200ac3cc5f365bc18149f87e28 /webkit/glue
parent135a95591f309ce16b6dc393487ff1d07a855036 (diff)
downloadchromium_src-10f9436f16c972adaee0e4d9f8e4fe40a91de843.zip
chromium_src-10f9436f16c972adaee0e4d9f8e4fe40a91de843.tar.gz
chromium_src-10f9436f16c972adaee0e4d9f8e4fe40a91de843.tar.bz2
DevTools: fix and reenable DevToolsSanityTest.TestShowScriptsTab. Only check that main page script is present when the tab is shown.
BUG=33107 TBR=pfeldman Review URL: http://codereview.chromium.org/553086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/devtools/js/tests.js41
1 files changed, 6 insertions, 35 deletions
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();
};