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

Unified Diff: components/safe_browsing_db/v4_database_unittest.cc

Issue 2814733002: Add the SocEng as a type for checking in CheckUrlForSubresourceFilter. (Closed)
Patch Set: . Created 3 years, 7 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_db/v4_database.cc ('k') | components/safe_browsing_db/v4_local_database_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/v4_database_unittest.cc
diff --git a/components/safe_browsing_db/v4_database_unittest.cc b/components/safe_browsing_db/v4_database_unittest.cc
index 431204551a8a2a4e0cf0696e6633ca4f47632ee9..66db6fa5b955a0872373c0727a0386b90d700215 100644
--- a/components/safe_browsing_db/v4_database_unittest.cc
+++ b/components/safe_browsing_db/v4_database_unittest.cc
@@ -468,13 +468,22 @@ TEST_F(V4DatabaseTest, TestStoresAvailable) {
const ListIdentifier bogus_id(LINUX_PLATFORM, CHROME_EXTENSION,
CSD_WHITELIST);
- EXPECT_TRUE(v4_database_->AreStoresAvailable(
+ EXPECT_TRUE(v4_database_->AreAllStoresAvailable(
StoresToCheck({linux_malware_id_, win_malware_id_})));
+ EXPECT_TRUE(v4_database_->AreAnyStoresAvailable(
+ StoresToCheck({linux_malware_id_, win_malware_id_})));
+
+ EXPECT_TRUE(
+ v4_database_->AreAllStoresAvailable(StoresToCheck({linux_malware_id_})));
+ EXPECT_TRUE(
+ v4_database_->AreAnyStoresAvailable(StoresToCheck({linux_malware_id_})));
- EXPECT_FALSE(v4_database_->AreStoresAvailable(
+ EXPECT_FALSE(v4_database_->AreAllStoresAvailable(
+ StoresToCheck({linux_malware_id_, bogus_id})));
+ EXPECT_TRUE(v4_database_->AreAnyStoresAvailable(
StoresToCheck({linux_malware_id_, bogus_id})));
- EXPECT_FALSE(v4_database_->AreStoresAvailable(StoresToCheck({bogus_id})));
+ EXPECT_FALSE(v4_database_->AreAllStoresAvailable(StoresToCheck({bogus_id})));
}
// Test to ensure that the callback to the database is dropped when the database
« no previous file with comments | « components/safe_browsing_db/v4_database.cc ('k') | components/safe_browsing_db/v4_local_database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698