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

Unified Diff: chrome/browser/ui/webui/browsing_history_handler_unittest.cc

Issue 2485253002: Remove unnecessary calls to GURL() (Closed)
Patch Set: Assert that StringPiece must always be canonicalized. Fix some constants. Created 4 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
Index: chrome/browser/ui/webui/browsing_history_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/browsing_history_handler_unittest.cc b/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
index 0d026cb40f5f189bf942fcc3426bed5bfca3ecf2..8a7a9f73e05a7c79bf5ddc41a69fd32c60a9ea7d 100644
--- a/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
+++ b/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
@@ -72,7 +72,7 @@ bool ResultEquals(
base::Time correct_time =
baseline_time + base::TimeDelta::FromHours(correct_result.hour_offset);
- return result.time == correct_time && result.url == GURL(correct_result.url);
+ return result.time == correct_time && result.url == correct_result.url;
}
void IgnoreBoolAndDoNothing(bool ignored_argument) {}
@@ -189,10 +189,10 @@ TEST_F(BrowsingHistoryHandlerTest, MAYBE_MergeDuplicateResults) {
{
// Basic test that duplicates on the same day are removed.
TestResult test_data[] = {
- { "http://google.com", 0 },
- { "http://google.de", 1 },
- { "http://google.com", 2 },
- { "http://google.com", 3 } // Most recent.
+ { "http://google.com/", 0 },
+ { "http://google.de/", 1 },
+ { "http://google.com/", 2 },
+ { "http://google.com/", 3 } // Most recent.
};
std::vector<BrowsingHistoryHandler::HistoryEntry> results;
AddQueryResults(test_data, arraysize(test_data), &results);
@@ -206,9 +206,9 @@ TEST_F(BrowsingHistoryHandlerTest, MAYBE_MergeDuplicateResults) {
{
// Test that a duplicate URL on the next day is not removed.
TestResult test_data[] = {
- { "http://google.com", 0 },
- { "http://google.com", 23 },
- { "http://google.com", 24 }, // Most recent.
+ { "http://google.com/", 0 },
+ { "http://google.com/", 23 },
+ { "http://google.com/", 24 }, // Most recent.
};
std::vector<BrowsingHistoryHandler::HistoryEntry> results;
AddQueryResults(test_data, arraysize(test_data), &results);
@@ -223,16 +223,16 @@ TEST_F(BrowsingHistoryHandlerTest, MAYBE_MergeDuplicateResults) {
// Test multiple duplicates across multiple days.
TestResult test_data[] = {
// First day.
- { "http://google.de", 0 },
- { "http://google.com", 1 },
- { "http://google.de", 2 },
- { "http://google.com", 3 },
+ { "http://google.de/", 0 },
+ { "http://google.com/", 1 },
+ { "http://google.de/", 2 },
+ { "http://google.com/", 3 },
// Second day.
- { "http://google.de", 24 },
- { "http://google.com", 25 },
- { "http://google.de", 26 },
- { "http://google.com", 27 }, // Most recent.
+ { "http://google.de/", 24 },
+ { "http://google.com/", 25 },
+ { "http://google.de/", 26 },
+ { "http://google.com/", 27 }, // Most recent.
};
std::vector<BrowsingHistoryHandler::HistoryEntry> results;
AddQueryResults(test_data, arraysize(test_data), &results);
@@ -248,10 +248,10 @@ TEST_F(BrowsingHistoryHandlerTest, MAYBE_MergeDuplicateResults) {
{
// Test that timestamps for duplicates are properly saved.
TestResult test_data[] = {
- { "http://google.com", 0 },
- { "http://google.de", 1 },
- { "http://google.com", 2 },
- { "http://google.com", 3 } // Most recent.
+ { "http://google.com/", 0 },
+ { "http://google.de/", 1 },
+ { "http://google.com/", 2 },
+ { "http://google.com/", 3 } // Most recent.
};
std::vector<BrowsingHistoryHandler::HistoryEntry> results;
AddQueryResults(test_data, arraysize(test_data), &results);
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.cc ('k') | components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698