summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 03:05:49 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 03:05:49 +0000
commite72885e73a4b93cd2bb10f39537f4027ce999f0e (patch)
treecfbb81bdcaf860c2f8841a7d3caa1ab721729c43 /chrome/test/ui
parent9287c14d8cc54f27e99075e171754fcdecb4ecce (diff)
downloadchromium_src-e72885e73a4b93cd2bb10f39537f4027ce999f0e.zip
chromium_src-e72885e73a4b93cd2bb10f39537f4027ce999f0e.tar.gz
chromium_src-e72885e73a4b93cd2bb10f39537f4027ce999f0e.tar.bz2
dom_checker_uitest: fix three related bugs
1) was using the wrong path for its http expectations file, so it was never successfully loading the file 2) was not properly aborting when it could load a file, so it'd run the full http test despite not having an expectations file 3) even with that, the http test always fails. At least it fails quickly now. BUG=21321 TEST=DomCheckerTest should get faster by failing fast Review URL: http://codereview.chromium.org/3549002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/dom_checker_uitest.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/chrome/test/ui/dom_checker_uitest.cc b/chrome/test/ui/dom_checker_uitest.cc
index 9ef0fda..1200c97 100644
--- a/chrome/test/ui/dom_checker_uitest.cc
+++ b/chrome/test/ui/dom_checker_uitest.cc
@@ -51,16 +51,16 @@ class DomCheckerTest : public UITest {
std::string failures_file = use_http ?
#if defined(OS_MACOSX)
- "expected_failures_mac-http.txt" : "expected_failures_mac-file.txt";
+ "expected_failures-http.txt" : "expected_failures_mac-file.txt";
#elif defined(OS_LINUX)
- "expected_failures_linux-http.txt" : "expected_failures_linux-file.txt";
+ "expected_failures-http.txt" : "expected_failures_linux-file.txt";
#elif defined(OS_WIN)
- "expected_failures_win-http.txt" : "expected_failures_win-file.txt";
+ "expected_failures-http.txt" : "expected_failures_win-file.txt";
#else
"" : "";
#endif
- GetExpectedFailures(failures_file, &expected_failures);
+ ASSERT_TRUE(GetExpectedFailures(failures_file, &expected_failures));
RunDomChecker(use_http, &test_count, &current_failures);
printf("\nTests run: %d\n", test_count);
@@ -130,13 +130,15 @@ class DomCheckerTest : public UITest {
}
}
- void GetExpectedFailures(const std::string& failures_file,
+ bool GetExpectedFailures(const std::string& failures_file,
ResultsSet* expected_failures) {
std::string expected_failures_text;
bool have_expected_results = ReadExpectedResults(failures_file,
&expected_failures_text);
- ASSERT_TRUE(have_expected_results);
+ if (!have_expected_results)
+ return false;
ParseExpectedFailures(expected_failures_text, expected_failures);
+ return true;
}
bool WaitUntilTestCompletes(TabProxy* tab) {
@@ -235,8 +237,11 @@ TEST_F(DomCheckerTest, File) {
PrintResults(new_passes, new_failures);
}
-// TODO(arv): http://crbug.com/21321
-TEST_F(DomCheckerTest, FLAKY_Http) {
+// This test was previously failing because it was looking for an
+// expected results file that didn't exist. Fixing that bug revealed
+// that the expected results weren't correct anyway.
+// http://crbug.com/21321
+TEST_F(DomCheckerTest, FAILS_Http) {
if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest))
return;