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

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

Issue 2375183002: Add metrics for paths in file scheme exceptions in content settings. (Closed)
Patch Set: Created 4 years, 3 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: 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 9ca587746c6844aecca17f43d469276f266b17fa..c24808584454ed3e047b353929a49a76f8249947 100644
--- a/components/content_settings/core/common/content_settings_pattern_unittest.cc
+++ b/components/content_settings/core/common/content_settings_pattern_unittest.cc
@@ -826,4 +826,11 @@ TEST(ContentSettingsPatternTest, Schemes) {
Pattern("www.example.com").GetScheme());
EXPECT_EQ(ContentSettingsPattern::SCHEME_OTHER,
Pattern("filesystem:http://www.google.com/temporary/").GetScheme());
+}
+
+TEST(ContentSettingsPatternTest, FileSchemeHasPath) {
+ EXPECT_FALSE(Pattern("file:///*").HasPath());
+ EXPECT_TRUE(Pattern("file:///foo").HasPath());
+ EXPECT_TRUE(Pattern("file:///foo/bar/").HasPath());
+ EXPECT_TRUE(Pattern("file:///foo/bar/test.html").HasPath());
}
« no previous file with comments | « components/content_settings/core/common/content_settings_pattern.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698