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

Unified Diff: chrome/common/extensions/url_pattern_unittest.cc

Issue 10224011: Add transparent support for filesystem URLs in URLPatterns. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated MatchesSecurityOrigin and added a comment, as discussed in IM. Created 8 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
« no previous file with comments | « chrome/common/extensions/url_pattern.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/url_pattern_unittest.cc
diff --git a/chrome/common/extensions/url_pattern_unittest.cc b/chrome/common/extensions/url_pattern_unittest.cc
index 10dff3d66b4b6744257753e798a78272e58cdfa7..d19d72d493363d76b36e2ca946cc0f5e71949ab8 100644
--- a/chrome/common/extensions/url_pattern_unittest.cc
+++ b/chrome/common/extensions/url_pattern_unittest.cc
@@ -110,11 +110,8 @@ TEST(ExtensionURLPatternTest, Match2) {
EXPECT_TRUE(pattern.MatchesURL(GURL("https://www.google.com/foobar")));
EXPECT_FALSE(pattern.MatchesURL(GURL("http://www.google.com/foo")));
EXPECT_FALSE(pattern.MatchesURL(GURL("https://www.google.com/")));
- EXPECT_FALSE(pattern.MatchesURL(
- GURL("filesystem:https://www.google.com/foobar/")));
- pattern.set_partial_filesystem_support_hack(true);
EXPECT_TRUE(pattern.MatchesURL(
- GURL("filesystem:https://www.google.com/foobar/bas")));
+ GURL("filesystem:https://www.google.com/foobar/")));
}
// subdomains
@@ -132,9 +129,8 @@ TEST(URLPatternTest, Match3) {
EXPECT_TRUE(pattern.MatchesURL(
GURL("http://monkey.images.google.com/foooobar")));
EXPECT_FALSE(pattern.MatchesURL(GURL("http://yahoo.com/foobar")));
- EXPECT_FALSE(pattern.MatchesURL(
- GURL("filesystem:http://google.com/foobar/")));
- pattern.set_partial_filesystem_support_hack(true);
+ EXPECT_TRUE(pattern.MatchesURL(
+ GURL("filesystem:http://google.com/foo/bar")));
EXPECT_FALSE(pattern.MatchesURL(
GURL("filesystem:http://google.com/temporary/foobar")));
}
@@ -383,8 +379,6 @@ TEST(ExtensionURLPatternTest, Match17) {
EXPECT_FALSE(pattern.MatchesURL(
GURL("filesystem:http://www.example.com:8080/foo/")));
EXPECT_FALSE(pattern.MatchesURL(GURL("filesystem:http://www.example.com/f/foo")));
- pattern.set_partial_filesystem_support_hack(true);
- EXPECT_FALSE(pattern.MatchesURL(GURL("filesystem:http://www.example.com/f/foo")));
}
// Explicit port wildcard
@@ -421,9 +415,6 @@ TEST(ExtensionURLPatternTest, Match19) {
EXPECT_TRUE(pattern.MatchesURL(
GURL("chrome-extension://ftw/https://google.com")));
EXPECT_FALSE(pattern.MatchesURL(GURL("chrome-extension://foobar")));
- EXPECT_FALSE(pattern.MatchesURL(
- GURL("filesystem:chrome-extension://ftw/t/file.txt")));
- pattern.set_partial_filesystem_support_hack(true);
EXPECT_TRUE(pattern.MatchesURL(
GURL("filesystem:chrome-extension://ftw/t/file.txt")));
};
« no previous file with comments | « chrome/common/extensions/url_pattern.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698