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

Unified Diff: components/safe_browsing/password_protection/password_protection_service_unittest.cc

Issue 2811483002: Ensure password protection service can receive non http/s URLs (Closed)
Patch Set: Created 3 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 | « components/safe_browsing/password_protection/password_protection_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing/password_protection/password_protection_service_unittest.cc
diff --git a/components/safe_browsing/password_protection/password_protection_service_unittest.cc b/components/safe_browsing/password_protection/password_protection_service_unittest.cc
index 3bef5dc8029d0e252a111820b85954786cc26a79..022fa2caa4a3867fe4c7e7a9ced86d96258d4806 100644
--- a/components/safe_browsing/password_protection/password_protection_service_unittest.cc
+++ b/components/safe_browsing/password_protection/password_protection_service_unittest.cc
@@ -447,6 +447,11 @@ TEST_F(PasswordProtectionServiceTest, TestCleanUpCachedVerdicts) {
// origin "http://bar.com" should be removed,
history::URLRows deleted_urls;
deleted_urls.push_back(history::URLRow(GURL("http://bar.com")));
+
+ // Delete an arbitrary data URL, to ensure the service is robust against
+ // filtering only http/s URLs. See crbug.com/709758.
+ deleted_urls.push_back(history::URLRow(GURL("data:text/html, <p>hellow")));
+
password_protection_service_->RemoveContentSettingsOnURLsDeleted(
false /* all_history */, deleted_urls);
EXPECT_EQ(1U, GetStoredVerdictCount());
« no previous file with comments | « components/safe_browsing/password_protection/password_protection_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698