Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: chrome/browser/download/download_browsertest.cc

Issue 8468028: Restructure URLRequestSlowDownloadJob to avoid races. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to TOT. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/net/url_request_slow_download_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index c5d67f434354bde165df154f2be107e0825a3d20..172fae92c61cc24a9c80e4dbeff5a19451b4b7a8 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,12 @@ 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);
if (memcmp(file_contents.c_str(), value.c_str(), expected_size) != 0)
return false;
@@ -837,10 +839,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% - "));
« no previous file with comments | « no previous file | content/browser/net/url_request_slow_download_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698