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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc

Issue 1875033005: [Downloads/History] Add tab-url and tab-referrer-url to DownloadRow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guid-fix
Patch Set: Update expectations for DownloadUIController test. Created 4 years, 8 months 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
Index: chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
index 352d4d0d462b550ce72d2cfc88bb2a302ae43eb7..c3a6f73472ba56ba1d3a5c85611ed53aafa35f32 100644
--- a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
@@ -271,12 +271,13 @@ class LastDownloadFinderTest : public testing::Test {
const base::FilePath::CharType* file_path) {
base::Time now(base::Time::Now());
return history::DownloadRow(
- base::FilePath(file_path),
- base::FilePath(file_path),
+ base::FilePath(file_path), base::FilePath(file_path),
std::vector<GURL>(1, GURL("http://www.google.com")), // url_chain
- GURL(), // referrer
- std::string(), // HTTP method
- "application/octet-stream", // mime_type
+ GURL("http://referrer.example.com/"), // referrer
+ GURL("http://tab-url.example.com/"), // tab URL
+ GURL("http://tab-referrer.example.com/"), // tab referrer URL
+ std::string(), // HTTP method
+ "application/octet-stream", // mime_type
"application/octet-stream", // original_mime_type
now - base::TimeDelta::FromMinutes(10), // start
now - base::TimeDelta::FromMinutes(9), // end
@@ -290,7 +291,7 @@ class LastDownloadFinderTest : public testing::Test {
content::DOWNLOAD_INTERRUPT_REASON_NONE), // interrupt_reason,
std::string(), // hash
download_id_++, // id
- base::GenerateGUID(),
+ base::GenerateGUID(), // GUID
false, // download_opened
std::string(), // ext_id
std::string()); // ext_name

Powered by Google App Engine
This is Rietveld 408576698