| Index: chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
| diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
| index 52569f743ab577fd897b032d2220632972c635d8..85b503fa46e322a1fbe3488ed7cad137922b3a24 100644
|
| --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
| +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
| @@ -69,14 +69,15 @@ TEST(WebRequestConditionTest, CreateCondition) {
|
| EXPECT_EQ("", error);
|
| ASSERT_TRUE(result.get());
|
|
|
| - TestURLRequestContext context;
|
| - TestURLRequest match_request(GURL("http://www.example.com"), NULL, &context);
|
| + net::TestURLRequestContext context;
|
| + net::TestURLRequest match_request(
|
| + GURL("http://www.example.com"), NULL, &context);
|
| content::ResourceRequestInfo::AllocateForTesting(&match_request,
|
| ResourceType::MAIN_FRAME, NULL, -1, -1);
|
| EXPECT_TRUE(result->IsFulfilled(
|
| WebRequestRule::RequestData(&match_request, ON_BEFORE_REQUEST)));
|
|
|
| - TestURLRequest wrong_resource_type(
|
| + net::TestURLRequest wrong_resource_type(
|
| GURL("https://www.example.com"), NULL, &context);
|
| content::ResourceRequestInfo::AllocateForTesting(&wrong_resource_type,
|
| ResourceType::SUB_FRAME, NULL, -1, -1);
|
| @@ -140,8 +141,8 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
|
| // Test that the result is correct and matches http://www.example.com and
|
| // https://www.example.com
|
| GURL http_url("http://www.example.com");
|
| - TestURLRequestContext context;
|
| - TestURLRequest http_request(http_url, NULL, &context);
|
| + net::TestURLRequestContext context;
|
| + net::TestURLRequest http_request(http_url, NULL, &context);
|
| url_match_ids = matcher.MatchURL(http_url);
|
| for (std::set<URLMatcherConditionSet::ID>::iterator i = url_match_ids.begin();
|
| i != url_match_ids.end(); ++i) {
|
| @@ -153,7 +154,7 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
|
|
|
| GURL https_url("https://www.example.com");
|
| url_match_ids = matcher.MatchURL(https_url);
|
| - TestURLRequest https_request(https_url, NULL, &context);
|
| + net::TestURLRequest https_request(https_url, NULL, &context);
|
| number_matches = 0;
|
| for (std::set<URLMatcherConditionSet::ID>::iterator i = url_match_ids.begin();
|
| i != url_match_ids.end(); ++i) {
|
| @@ -166,7 +167,7 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
|
| // Check that both, hostPrefix and hostSuffix are evaluated.
|
| GURL https_foo_url("https://foo.example.com");
|
| url_match_ids = matcher.MatchURL(https_foo_url);
|
| - TestURLRequest https_foo_request(https_foo_url, NULL, &context);
|
| + net::TestURLRequest https_foo_request(https_foo_url, NULL, &context);
|
| number_matches = 0;
|
| for (std::set<URLMatcherConditionSet::ID>::iterator i = url_match_ids.begin();
|
| i != url_match_ids.end(); ++i) {
|
| @@ -223,23 +224,23 @@ TEST(WebRequestConditionTest, TestPortFilter) {
|
|
|
| // Test various URLs.
|
| GURL http_url("http://www.example.com");
|
| - TestURLRequestContext context;
|
| - TestURLRequest http_request(http_url, NULL, &context);
|
| + net::TestURLRequestContext context;
|
| + net::TestURLRequest http_request(http_url, NULL, &context);
|
| url_match_ids = matcher.MatchURL(http_url);
|
| ASSERT_EQ(1u, url_match_ids.size());
|
|
|
| GURL http_url_80("http://www.example.com:80");
|
| - TestURLRequest http_request_80(http_url_80, NULL, &context);
|
| + net::TestURLRequest http_request_80(http_url_80, NULL, &context);
|
| url_match_ids = matcher.MatchURL(http_url_80);
|
| ASSERT_EQ(1u, url_match_ids.size());
|
|
|
| GURL http_url_1000("http://www.example.com:1000");
|
| - TestURLRequest http_request_1000(http_url_1000, NULL, &context);
|
| + net::TestURLRequest http_request_1000(http_url_1000, NULL, &context);
|
| url_match_ids = matcher.MatchURL(http_url_1000);
|
| ASSERT_EQ(1u, url_match_ids.size());
|
|
|
| GURL http_url_2000("http://www.example.com:2000");
|
| - TestURLRequest http_request_2000(http_url_2000, NULL, &context);
|
| + net::TestURLRequest http_request_2000(http_url_2000, NULL, &context);
|
| url_match_ids = matcher.MatchURL(http_url_2000);
|
| ASSERT_EQ(0u, url_match_ids.size());
|
| }
|
|
|