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

Unified Diff: chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc

Issue 2419503002: Whitelisting one more crx download url (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_url_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc b/chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc
index 7fd7bd048032892469289b2a50ca0c5b443cdd03..3df2b3311573f8ffb59de8f8b21a9aaba3bd9f90 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc
@@ -513,8 +513,9 @@ TEST_F(SupervisedUserURLFilterTest, WhitelistsHostnameHashes) {
TEST_F(SupervisedUserURLFilterTest, ChromeWebstoreDownloadsAreAlwaysAllowed) {
// When installing an extension from Chrome Webstore, it tries to download the
// crx file from "https://clients2.google.com/service/update2/", which
- // redirects to "https://clients2.googleusercontent.com/crx/blobs/".
- // Both URLs should be whitelisted regardless from the default filtering
+ // redirects to "https://clients2.googleusercontent.com/crx/blobs/"
+ // or "https://chrome.google.com/webstore/download/".
+ // All URLs should be whitelisted regardless from the default filtering
// behavior.
GURL crx_download_url1(
"https://clients2.google.com/service/update2/"
@@ -526,12 +527,19 @@ TEST_F(SupervisedUserURLFilterTest, ChromeWebstoreDownloadsAreAlwaysAllowed) {
"QgAAAC6zw0qH2DJtnXe8Z7rUJP1iCQF099oik9f2ErAYeFAX7_"
"CIyrNH5qBru1lUSBNvzmjILCGwUjcIBaJqxgegSNy2melYqfodngLxKtHsGBehAMZSmuWSg6"
"FupAcPS3Ih6NSVCOB9KNh6Mw/extension_2_0.crx");
+ GURL crx_download_url3(
+ "https://chrome.google.com/webstore/download/"
+ "QgAAAC6zw0qH2DJtnXe8Z7rUJP1iCQF099oik9f2ErAYeFAX7_"
+ "CIyrNH5qBru1lUSBNvzmjILCGwUjcIBaJqxgegSNy2melYqfodngLxKtHsGBehAMZSmuWSg6"
+ "FupAcPS3Ih6NSVCOB9KNh6Mw/extension_2_0.crx");
filter_->SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK);
EXPECT_EQ(SupervisedUserURLFilter::ALLOW,
filter_->GetFilteringBehaviorForURL(crx_download_url1));
EXPECT_EQ(SupervisedUserURLFilter::ALLOW,
filter_->GetFilteringBehaviorForURL(crx_download_url2));
+ EXPECT_EQ(SupervisedUserURLFilter::ALLOW,
+ filter_->GetFilteringBehaviorForURL(crx_download_url3));
// Set explicit host rules to block those website, and make sure the
// update URLs still work.
@@ -544,6 +552,8 @@ TEST_F(SupervisedUserURLFilterTest, ChromeWebstoreDownloadsAreAlwaysAllowed) {
filter_->GetFilteringBehaviorForURL(crx_download_url1));
EXPECT_EQ(SupervisedUserURLFilter::ALLOW,
filter_->GetFilteringBehaviorForURL(crx_download_url2));
+ EXPECT_EQ(SupervisedUserURLFilter::ALLOW,
+ filter_->GetFilteringBehaviorForURL(crx_download_url3));
}
#endif
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_url_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698