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

Unified Diff: chrome/common/content_settings_pattern_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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/common/content_settings_pattern_unittest.cc
diff --git a/chrome/common/content_settings_pattern_unittest.cc b/chrome/common/content_settings_pattern_unittest.cc
index 921f97b359596df0f12b85f9903679edee7ffa65..c1c1e3793afb4598898a5f580e235efc76994644 100644
--- a/chrome/common/content_settings_pattern_unittest.cc
+++ b/chrome/common/content_settings_pattern_unittest.cc
@@ -420,8 +420,8 @@ TEST(ContentSettingsPatternTest, InvalidPatterns) {
EXPECT_STREQ("", ContentSettingsPattern().ToString().c_str());
// Empty pattern string
- EXPECT_FALSE(Pattern("").IsValid());
- EXPECT_STREQ("", Pattern("").ToString().c_str());
+ EXPECT_FALSE(Pattern(std::string()).IsValid());
+ EXPECT_STREQ("", Pattern(std::string()).ToString().c_str());
// Pattern strings with invalid scheme part.
EXPECT_FALSE(Pattern("ftp://myhost.org").IsValid());
@@ -630,8 +630,7 @@ TEST(ContentSettingsPatternTest, PatternSupport_Legacy) {
EXPECT_TRUE(
Pattern("file:///tmp/test.html").Matches(
GURL("file:///tmp/test.html")));
- EXPECT_FALSE(Pattern("").Matches(
- GURL("http://www.example.com/")));
+ EXPECT_FALSE(Pattern(std::string()).Matches(GURL("http://www.example.com/")));
EXPECT_FALSE(Pattern("[*.]example.com").Matches(
GURL("http://example.org/")));
EXPECT_FALSE(Pattern("example.com").Matches(
« no previous file with comments | « chrome/common/content_settings_pattern_parser.cc ('k') | chrome/common/extensions/api/commands/commands_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698