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

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

Issue 1443033004: Supervised User whitelists: update to json format v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove l10n Created 5 years, 1 month 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: 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 2ea0127646810934aa3d6a14376d91b8a5a5ca9d..54cf4239b89a8cde95c1319b53d345ebabed84cc 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc
@@ -38,7 +38,7 @@ TEST_F(SupervisedUserURLFilterTest, Basic) {
std::vector<std::string> list;
// Allow domain and all subdomains, for any filtered scheme.
list.push_back("google.com");
- filter_->SetFromPatterns(list);
+ filter_->SetFromPatternsForTesting(list);
run_loop_.Run();
EXPECT_TRUE(IsURLWhitelisted("http://google.com"));
@@ -64,7 +64,7 @@ TEST_F(SupervisedUserURLFilterTest, Inactive) {
std::vector<std::string> list;
list.push_back("google.com");
- filter_->SetFromPatterns(list);
+ filter_->SetFromPatternsForTesting(list);
run_loop_.Run();
// If the filter is inactive, every URL should be whitelisted.
@@ -78,7 +78,7 @@ TEST_F(SupervisedUserURLFilterTest, Scheme) {
list.push_back("http://secure.com");
list.push_back("ftp://secure.com");
list.push_back("ws://secure.com");
- filter_->SetFromPatterns(list);
+ filter_->SetFromPatternsForTesting(list);
run_loop_.Run();
EXPECT_TRUE(IsURLWhitelisted("http://secure.com"));
@@ -96,7 +96,7 @@ TEST_F(SupervisedUserURLFilterTest, Path) {
std::vector<std::string> list;
// Filter only a certain path prefix.
list.push_back("path.to/ruin");
- filter_->SetFromPatterns(list);
+ filter_->SetFromPatternsForTesting(list);
run_loop_.Run();
EXPECT_TRUE(IsURLWhitelisted("http://path.to/ruin"));
@@ -111,7 +111,7 @@ TEST_F(SupervisedUserURLFilterTest, PathAndScheme) {
std::vector<std::string> list;
// Filter only a certain path prefix and scheme.
list.push_back("https://s.aaa.com/path");
- filter_->SetFromPatterns(list);
+ filter_->SetFromPatternsForTesting(list);
run_loop_.Run();
EXPECT_TRUE(IsURLWhitelisted("https://s.aaa.com/path"));
@@ -127,7 +127,7 @@ TEST_F(SupervisedUserURLFilterTest, Host) {
std::vector<std::string> list;
// Filter only a certain hostname, without subdomains.
list.push_back(".www.example.com");
- filter_->SetFromPatterns(list);
+ filter_->SetFromPatternsForTesting(list);
run_loop_.Run();
EXPECT_TRUE(IsURLWhitelisted("http://www.example.com"));
@@ -139,7 +139,7 @@ TEST_F(SupervisedUserURLFilterTest, IPAddress) {
std::vector<std::string> list;
// Filter an ip address.
list.push_back("123.123.123.123");
- filter_->SetFromPatterns(list);
+ filter_->SetFromPatternsForTesting(list);
run_loop_.Run();
EXPECT_TRUE(IsURLWhitelisted("http://123.123.123.123/"));

Powered by Google App Engine
This is Rietveld 408576698