Index: chrome/browser/download/download_browsertest.cc |
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc |
index a5ebdaea628e9ba3abfb8ed8a96b30bc2a33f262..ddf8717e9d0756cf2ffe7fce1e682a72d2d8da39 100644 |
--- a/chrome/browser/download/download_browsertest.cc |
+++ b/chrome/browser/download/download_browsertest.cc |
@@ -645,7 +645,7 @@ class DownloadTest : public InProcessBrowserTest { |
std::string file_contents; |
bool read = file_util::ReadFileToString(path, &file_contents); |
- |
+ EXPECT_TRUE(read) << "Failed reading file: " << path.value() << std::endl; |
if (!read) |
return false; // Couldn't read the file. |
@@ -654,10 +654,14 @@ class DownloadTest : public InProcessBrowserTest { |
size_t expected_size = static_cast<size_t>(file_size); |
// Check the size. |
+ EXPECT_EQ(expected_size, file_contents.size()); |
if (expected_size != file_contents.size()) |
return false; |
// Check the contents. |
+ EXPECT_EQ(value, file_contents) |
+ << "File string comparison mismatch. Expected: ----\n" << value |
eroman
2011/11/18 01:54:46
I believe EXPECT_EQ prints the mismatch, so should
Randy Smith (Not in Mondays)
2011/11/18 15:30:18
Done.
|
+ << "\n---\nGot:\n----\n" << file_contents << std::endl; |
if (memcmp(file_contents.c_str(), value.c_str(), expected_size) != 0) |
return false; |
@@ -836,10 +840,6 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, UnknownSize) { |
"32.0 KB - ", "100% - ")); |
} |
-#if defined(OS_LINUX) |
-// http://crbug.com/104310 |
-#define KnownSize FLAKY_KnownSize |
-#endif |
IN_PROC_BROWSER_TEST_F(DownloadTest, KnownSize) { |
ASSERT_TRUE(RunSizeTest(browser(), SIZE_TEST_TYPE_KNOWN, |
"71% - ", "100% - ")); |