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

Unified Diff: chrome/browser/search_engines/template_url_service_unittest.cc

Issue 2421383003: Add operator==(const GURL&, const StringPiece&) to gurl.h (Closed)
Patch Set: remove comment Created 4 years, 2 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/search_engines/template_url_service_unittest.cc
diff --git a/chrome/browser/search_engines/template_url_service_unittest.cc b/chrome/browser/search_engines/template_url_service_unittest.cc
index d1d82f7925a3a970c9f07b38da52c146a0865b62..fe23c2ab3dca76f11b426b6e55e247f101b41242 100644
--- a/chrome/browser/search_engines/template_url_service_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_unittest.cc
@@ -594,8 +594,9 @@ TEST_F(TemplateURLServiceTest, ClearBrowsingData_KeywordsForUrls) {
// Try removing foo2. This should delete foo2, but leave foo1 and 3 untouched.
GURL url2("http://foo2");
model()->RemoveAutoGeneratedForUrlsBetween(
- base::Bind(&GURL::operator==, base::Unretained(&url2)), month_ago,
- now + one_day);
+ base::Bind(static_cast<bool (*)(const GURL&, const GURL&)>(operator==),
+ url2),
+ month_ago, now + one_day);
EXPECT_EQ(2U, model()->GetTemplateURLs().size());
EXPECT_EQ(ASCIIToUTF16("key1"), model()->GetTemplateURLs()[0]->keyword());
EXPECT_TRUE(model()->GetTemplateURLs()[0]->safe_for_autoreplace());
@@ -606,8 +607,9 @@ TEST_F(TemplateURLServiceTest, ClearBrowsingData_KeywordsForUrls) {
// should remain untouched.
GURL url1("http://foo1");
model()->RemoveAutoGeneratedForUrlsBetween(
- base::Bind(&GURL::operator==, base::Unretained(&url1)), now,
- now + one_day);
+ base::Bind(static_cast<bool (*)(const GURL&, const GURL&)>(operator==),
+ url1),
+ now, now + one_day);
EXPECT_EQ(2U, model()->GetTemplateURLs().size());
EXPECT_EQ(ASCIIToUTF16("key1"), model()->GetTemplateURLs()[0]->keyword());
EXPECT_TRUE(model()->GetTemplateURLs()[0]->safe_for_autoreplace());
@@ -617,8 +619,9 @@ TEST_F(TemplateURLServiceTest, ClearBrowsingData_KeywordsForUrls) {
// Try removing foo3. This should delete foo3, but leave foo1 untouched.
GURL url3("http://foo3");
model()->RemoveAutoGeneratedForUrlsBetween(
- base::Bind(&GURL::operator==, base::Unretained(&url3)), month_ago,
- now + one_day + one_day);
+ base::Bind(static_cast<bool (*)(const GURL&, const GURL&)>(operator==),
+ url3),
+ month_ago, now + one_day + one_day);
EXPECT_EQ(1U, model()->GetTemplateURLs().size());
EXPECT_EQ(ASCIIToUTF16("key1"), model()->GetTemplateURLs()[0]->keyword());
EXPECT_TRUE(model()->GetTemplateURLs()[0]->safe_for_autoreplace());
« no previous file with comments | « chrome/browser/password_manager/password_store_mac_unittest.cc ('k') | chrome/renderer/autofill/form_autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698