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

Unified Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merged with latest version Created 8 years, 6 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: chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc
index 81592938e073b886c70aa7825f21330269d813c7..a356c7db551a5a1c0f774386babe47a735603d67 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc
@@ -213,7 +213,8 @@ TEST_F(WebRequestRulesRegistryTest, AddRulesImpl) {
std::set<WebRequestRule::GlobalRuleId> matches;
GURL http_url("http://www.example.com");
- TestURLRequest http_request(http_url, NULL);
+ TestURLRequestContext context;
+ TestURLRequest http_request(http_url, NULL, &context);
matches = registry->GetMatches(&http_request, ON_BEFORE_REQUEST);
EXPECT_EQ(2u, matches.size());
EXPECT_TRUE(matches.find(std::make_pair(kExtensionId, kRuleId1)) !=
@@ -222,7 +223,7 @@ TEST_F(WebRequestRulesRegistryTest, AddRulesImpl) {
matches.end());
GURL foobar_url("http://www.foobar.com");
- TestURLRequest foobar_request(foobar_url, NULL);
+ TestURLRequest foobar_request(foobar_url, NULL, &context);
matches = registry->GetMatches(&foobar_request, ON_BEFORE_REQUEST);
EXPECT_EQ(1u, matches.size());
EXPECT_TRUE(matches.find(std::make_pair(kExtensionId, kRuleId2)) !=
@@ -334,7 +335,8 @@ TEST_F(WebRequestRulesRegistryTest, Precedences) {
EXPECT_EQ("", error);
GURL url("http://www.google.com");
- TestURLRequest request(url, NULL);
+ TestURLRequestContext context;
+ TestURLRequest request(url, NULL, &context);
std::list<LinkedPtrEventResponseDelta> deltas =
registry->CreateDeltas(&request, ON_BEFORE_REQUEST,
WebRequestRule::OptionalRequestData());
@@ -381,7 +383,8 @@ TEST_F(WebRequestRulesRegistryTest, Priorities) {
EXPECT_EQ("", error);
GURL url("http://www.google.com/index.html");
- TestURLRequest request(url, NULL);
+ TestURLRequestContext context;
+ TestURLRequest request(url, NULL, &context);
std::list<LinkedPtrEventResponseDelta> deltas =
registry->CreateDeltas(&request, ON_BEFORE_REQUEST,
WebRequestRule::OptionalRequestData());

Powered by Google App Engine
This is Rietveld 408576698