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

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

Issue 11410066: Revert 167337 - Move url_request_test_util into net namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc
===================================================================
--- chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc (revision 167354)
+++ chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc (working copy)
@@ -84,15 +84,14 @@
EXPECT_EQ("", error);
ASSERT_TRUE(attribute.get());
- net::TestURLRequestContext context;
- net::TestURLRequest url_request_ok(
- GURL("http://www.example.com"), NULL, &context);
+ TestURLRequestContext context;
+ TestURLRequest url_request_ok(GURL("http://www.example.com"), NULL, &context);
content::ResourceRequestInfo::AllocateForTesting(&url_request_ok,
ResourceType::MAIN_FRAME, NULL, -1, -1);
EXPECT_TRUE(attribute->IsFulfilled(
WebRequestRule::RequestData(&url_request_ok, ON_BEFORE_REQUEST)));
- net::TestURLRequest url_request_fail(
+ TestURLRequest url_request_fail(
GURL("http://www.example.com"), NULL, &context);
content::ResourceRequestInfo::AllocateForTesting(&url_request_ok,
ResourceType::SUB_FRAME, NULL, -1, -1);
@@ -114,10 +113,10 @@
"chrome/test/data/extensions/api_test/webrequest/declarative")));
ASSERT_TRUE(test_server.Start());
- net::TestURLRequestContext context;
- net::TestDelegate delegate;
- net::TestURLRequest url_request(test_server.GetURL("files/headers.html"),
- &delegate, &context);
+ TestURLRequestContext context;
+ TestDelegate delegate;
+ TestURLRequest url_request(test_server.GetURL("files/headers.html"),
+ &delegate, &context);
url_request.Start();
MessageLoop::current()->Run();
@@ -191,9 +190,9 @@
const GURL url_empty;
const GURL url_a("http://a.com");
const GURL url_b("http://b.com");
- net::TestURLRequestContext context;
- net::TestDelegate delegate;
- net::TestURLRequest url_request(url_a, &delegate, &context);
+ TestURLRequestContext context;
+ TestDelegate delegate;
+ TestURLRequest url_request(url_a, &delegate, &context);
for (unsigned int i = 1; i <= kLastActiveStage; i <<= 1) {
if (!(kActiveStages & i))
@@ -278,9 +277,9 @@
}
const GURL url_empty;
- net::TestURLRequestContext context;
- net::TestDelegate delegate;
- net::TestURLRequest url_request(url_empty, &delegate, &context);
+ TestURLRequestContext context;
+ TestDelegate delegate;
+ TestURLRequest url_request(url_empty, &delegate, &context);
for (size_t i = 0; i < arraysize(active_stages); ++i) {
EXPECT_FALSE(empty_attribute->IsFulfilled(WebRequestRule::RequestData(
@@ -400,10 +399,10 @@
// Necessary for TestURLRequest.
MessageLoop message_loop(MessageLoop::TYPE_IO);
- net::TestURLRequestContext context;
- net::TestDelegate delegate;
- net::TestURLRequest url_request(GURL("http://example.com"), // Dummy URL.
- &delegate, &context);
+ TestURLRequestContext context;
+ TestDelegate delegate;
+ TestURLRequest url_request(GURL("http://example.com"), // Dummy URL.
+ &delegate, &context);
url_request.SetExtraRequestHeaderByName(
"Custom-header", "custom/value", true /* overwrite */);
url_request.Start();
@@ -485,10 +484,10 @@
"chrome/test/data/extensions/api_test/webrequest/declarative")));
ASSERT_TRUE(test_server.Start());
- net::TestURLRequestContext context;
- net::TestDelegate delegate;
- net::TestURLRequest url_request(test_server.GetURL("files/headers.html"),
- &delegate, &context);
+ TestURLRequestContext context;
+ TestDelegate delegate;
+ TestURLRequest url_request(test_server.GetURL("files/headers.html"),
+ &delegate, &context);
url_request.Start();
MessageLoop::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698