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

Unified Diff: components/content_settings/core/common/content_settings_pattern_unittest.cc

Issue 1047153002: Show content settings exceptions in correct order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Show content settings exceptions in correct order Created 5 years, 9 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
« no previous file with comments | « chrome/browser/ui/webui/options/content_settings_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/content_settings/core/common/content_settings_pattern_unittest.cc
diff --git a/components/content_settings/core/common/content_settings_pattern_unittest.cc b/components/content_settings/core/common/content_settings_pattern_unittest.cc
index 3688d8448264c68784aaf398dcda8d8bb6b22f4c..3fb0448276f0e344b39bdd6fad6d2346f64b0043 100644
--- a/components/content_settings/core/common/content_settings_pattern_unittest.cc
+++ b/components/content_settings/core/common/content_settings_pattern_unittest.cc
@@ -555,6 +555,7 @@ TEST(ContentSettingsPatternTest, Compare) {
EXPECT_EQ(ContentSettingsPattern::SUCCESSOR,
Pattern("[*.]google.com").Compare(
Pattern("mail.google.com")));
+ EXPECT_TRUE(Pattern("mail.google.com") > Pattern("[*.]google.com"));
EXPECT_EQ(ContentSettingsPattern::PREDECESSOR,
Pattern("[*.]mail.google.com").Compare(
@@ -562,6 +563,7 @@ TEST(ContentSettingsPatternTest, Compare) {
EXPECT_EQ(ContentSettingsPattern::SUCCESSOR,
Pattern("[*.]google.com").Compare(
Pattern("[*.]mail.google.com")));
+ EXPECT_TRUE(Pattern("[*.]mail.google.com") > Pattern("[*.]google.com"));
EXPECT_EQ(ContentSettingsPattern::PREDECESSOR,
Pattern("mail.google.com:80").Compare(
@@ -569,6 +571,7 @@ TEST(ContentSettingsPatternTest, Compare) {
EXPECT_EQ(ContentSettingsPattern::SUCCESSOR,
Pattern("mail.google.com:*").Compare(
Pattern("mail.google.com:80")));
+ EXPECT_TRUE(Pattern("mail.google.com:80") > Pattern("mail.google.com:*"));
EXPECT_EQ(ContentSettingsPattern::PREDECESSOR,
Pattern("https://mail.google.com:*").Compare(
« no previous file with comments | « chrome/browser/ui/webui/options/content_settings_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698