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

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

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Converted new unittest. 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_condition_attribute_unittest.cc
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc
index bbcfc0783e067b6b7cd3e0727840981a70737819..f81f6f2ef83473515b184fcceb5db9cee2e1e2c9 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc
@@ -67,12 +67,14 @@ TEST(WebRequestConditionAttributeTest, TestResourceType) {
EXPECT_EQ("", error);
ASSERT_TRUE(attribute.get());
- TestURLRequest url_request_ok(GURL("http://www.example.com"), NULL);
+ TestURLRequestContext context;
mmenke 2012/06/20 18:33:50 Is there a reason you're using a TestURLRequestCon
shalev 2012/06/20 20:13:12 I'm trying to maintain existing behavior. Previous
mmenke 2012/06/20 20:24:14 Ahh...Good point, missed that. Was looking at the
+ TestURLRequest url_request_ok(GURL("http://www.example.com"), NULL, &context);
content::ResourceRequestInfo::AllocateForTesting(&url_request_ok,
ResourceType::MAIN_FRAME, NULL);
EXPECT_TRUE(attribute->IsFulfilled(&url_request_ok, ON_BEFORE_REQUEST));
- TestURLRequest url_request_fail(GURL("http://www.example.com"), NULL);
+ TestURLRequest url_request_fail(
+ GURL("http://www.example.com"), NULL, &context);
content::ResourceRequestInfo::AllocateForTesting(&url_request_ok,
ResourceType::SUB_FRAME, NULL);
EXPECT_FALSE(attribute->IsFulfilled(&url_request_fail, ON_BEFORE_REQUEST));

Powered by Google App Engine
This is Rietveld 408576698