summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 20:50:03 +0000
committerager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 20:50:03 +0000
commiteba9677e3ca98f6b968f1c5050141bf7b95d5421 (patch)
treee882609672b83e658deb0327ca4789cda1484e64
parent88fa072e3b345923caa58795a0b8fa739431ddb3 (diff)
downloadchromium_src-eba9677e3ca98f6b968f1c5050141bf7b95d5421.zip
chromium_src-eba9677e3ca98f6b968f1c5050141bf7b95d5421.tar.gz
chromium_src-eba9677e3ca98f6b968f1c5050141bf7b95d5421.tar.bz2
Fix a flaky dev tools sanity test.
The test only works if the source of scripts are found in a specific order. This cannot be ensured since the source is found by traversing the heap. The scripts tab is only visible after processing the debugger test page, so only check for visibility in that case. Enable test on Linux again where it passes after this change. TEST=none BUG=26540 Review URL: http://codereview.chromium.org/434044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32968 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/debugger/devtools_sanity_unittest.cc3
-rw-r--r--webkit/glue/devtools/js/tests.js7
2 files changed, 3 insertions, 7 deletions
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
index 237ee83..94ab316 100644
--- a/chrome/browser/debugger/devtools_sanity_unittest.cc
+++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -290,12 +290,9 @@ IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) {
}
// Tests scripts panel showing.
-// TODO(pfeldman): http://crbug.com/26540 This test fails on Linux.
-#if !defined(OS_LINUX)
IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) {
RunTest("testShowScriptsTab", kDebuggerTestPage);
}
-#endif
// Tests that scripts tab is populated with inspected scripts even if it
// hadn't been shown by the moment inspected paged refreshed.
diff --git a/webkit/glue/devtools/js/tests.js b/webkit/glue/devtools/js/tests.js
index 862ab2d..db3c8b2 100644
--- a/webkit/glue/devtools/js/tests.js
+++ b/webkit/glue/devtools/js/tests.js
@@ -431,14 +431,13 @@ TestSuite.prototype.testShowScriptsTab = function() {
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);
}
- if (!WebInspector.panels.scripts.visibleView) {
- test.fail('No visible script view: ' + sourceURL);
- }
-
// There should be two scripts: one for the main page and another
// one which is source of console API(see
// InjectedScript._ensureCommandLineAPIInstalled).