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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc

Issue 1989243003: Add DRP client config tests for secure proxy check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
index 995dff5f7d81e36597387af51a6a1823628b64f6..4b20b339206bb6671cf58535ba5c51b40e6ffa67 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
@@ -139,26 +139,16 @@ TEST_F(DataReductionProxyConfiguratorTest, TestDisable) {
TEST_F(DataReductionProxyConfiguratorTest, TestBypassList) {
config_->AddHostPatternToBypass("http://www.google.com");
config_->AddHostPatternToBypass("fefe:13::abc/33");
- config_->AddURLPatternToBypass("foo.org/images/*");
- config_->AddURLPatternToBypass("http://foo.com/*");
- config_->AddURLPatternToBypass("http://baz.com:22/bar/*");
- config_->AddURLPatternToBypass("http://*bat.com/bar/*");
std::string expected[] = {
"http://www.google.com",
"fefe:13::abc/33",
- "foo.org",
- "http://foo.com",
- "http://baz.com:22",
- "http://*bat.com"
};
- ASSERT_EQ(config_->bypass_rules_.size(), 6u);
+ ASSERT_EQ(arraysize(expected), config_->bypass_rules_.size());
int i = 0;
- for (std::vector<std::string>::iterator it = config_->bypass_rules_.begin();
- it != config_->bypass_rules_.end(); ++it) {
- EXPECT_EQ(expected[i++], *it);
- }
+ for (const std::string& bypass_rule : config_->bypass_rules_)
+ EXPECT_EQ(expected[i++], bypass_rule);
}
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698