 Chromium Code Reviews
 Chromium Code Reviews Issue 102683004:
  Add mime type information to the download database  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 102683004:
  Add mime type information to the download database  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: chrome/browser/download/download_history_unittest.cc | 
| diff --git a/chrome/browser/download/download_history_unittest.cc b/chrome/browser/download/download_history_unittest.cc | 
| index 0316883af53315d071c2e778266ce085da25f2e0..b1a4a52de179406855a938dbc0aac1ea2dc3373d 100644 | 
| --- a/chrome/browser/download/download_history_unittest.cc | 
| +++ b/chrome/browser/download/download_history_unittest.cc | 
| @@ -3,6 +3,7 @@ | 
| // found in the LICENSE file. | 
| #include <set> | 
| +#include <string> | 
| 
asanka
2013/12/16 21:51:48
nit: not necessary. Neither is <set>, it seems.
 | 
| #include <vector> | 
| #include "base/rand_util.h" | 
| @@ -42,6 +43,8 @@ void CheckInfoEqual(const history::DownloadRow& left, | 
| EXPECT_EQ(left.url_chain[i].spec(), right.url_chain[i].spec()); | 
| } | 
| EXPECT_EQ(left.referrer_url.spec(), right.referrer_url.spec()); | 
| + EXPECT_EQ(left.mime_type, right.mime_type); | 
| + EXPECT_EQ(left.original_mime_type, right.original_mime_type); | 
| EXPECT_EQ(left.start_time.ToTimeT(), right.start_time.ToTimeT()); | 
| EXPECT_EQ(left.end_time.ToTimeT(), right.end_time.ToTimeT()); | 
| EXPECT_EQ(left.etag, right.etag); | 
| @@ -243,6 +246,8 @@ class DownloadHistoryTest : public testing::Test { | 
| infos->at(index).target_path, | 
| infos->at(index).url_chain, | 
| infos->at(index).referrer_url, | 
| + infos->at(index).mime_type, | 
| + infos->at(index).original_mime_type, | 
| infos->at(index).start_time, | 
| infos->at(index).end_time, | 
| infos->at(index).etag, | 
| @@ -340,6 +345,8 @@ class DownloadHistoryTest : public testing::Test { | 
| base::FilePath(path), | 
| url_chain, | 
| referrer, | 
| + "application/octet-stream", | 
| + "application/octet-stream", | 
| (base::Time::Now() - base::TimeDelta::FromMinutes(10)), | 
| (base::Time::Now() - base::TimeDelta::FromMinutes(1)), | 
| "Etag", | 
| @@ -361,6 +368,8 @@ class DownloadHistoryTest : public testing::Test { | 
| const base::FilePath& target_path, | 
| const std::vector<GURL>& url_chain, | 
| const GURL& referrer, | 
| + const std::string mime_type, | 
| 
asanka
2013/12/16 21:51:48
Nit: const std::string&. Here and elsewhere.
 | 
| + const std::string original_mime_type, | 
| const base::Time& start_time, | 
| const base::Time& end_time, | 
| const std::string& etag, | 
| @@ -384,6 +393,8 @@ class DownloadHistoryTest : public testing::Test { | 
| info->target_path = target_path; | 
| info->url_chain = url_chain; | 
| info->referrer_url = referrer; | 
| + info->mime_type = mime_type; | 
| + info->original_mime_type = original_mime_type; | 
| info->start_time = start_time; | 
| info->end_time = end_time; | 
| info->etag = etag; | 
| @@ -408,8 +419,9 @@ class DownloadHistoryTest : public testing::Test { | 
| .WillRepeatedly(ReturnRefOfCopy(url_chain[0])); | 
| EXPECT_CALL(item(index), GetUrlChain()) | 
| .WillRepeatedly(ReturnRefOfCopy(url_chain)); | 
| - EXPECT_CALL(item(index), GetMimeType()) | 
| - .WillRepeatedly(Return("application/octet-stream")); | 
| + EXPECT_CALL(item(index), GetMimeType()).WillRepeatedly(Return(mime_type)); | 
| + EXPECT_CALL(item(index), GetOriginalMimeType()).WillRepeatedly(Return( | 
| + original_mime_type)); | 
| EXPECT_CALL(item(index), GetReferrerUrl()) | 
| .WillRepeatedly(ReturnRefOfCopy(referrer)); | 
| EXPECT_CALL(item(index), GetStartTime()).WillRepeatedly(Return(start_time)); |