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

Unified Diff: chrome/browser/chromeos/gview_request_interceptor_unittest.cc

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 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/chromeos/gview_request_interceptor_unittest.cc
diff --git a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
index 7ba3b5d6797d9dff8da2a830663456acd2e297e4..1f3b7be5caf1d336aeaf7824c063ffeb07762f25 100644
--- a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
+++ b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
@@ -19,7 +19,7 @@ namespace chromeos {
class GViewURLRequestTestJob : public URLRequestTestJob {
public:
- explicit GViewURLRequestTestJob(URLRequest* request)
+ explicit GViewURLRequestTestJob(net::URLRequest* request)
: URLRequestTestJob(request, true) {
}
@@ -49,18 +49,18 @@ class GViewURLRequestTestJob : public URLRequestTestJob {
class GViewRequestInterceptorTest : public testing::Test {
public:
virtual void SetUp() {
- URLRequest::RegisterProtocolFactory("http",
+ net::URLRequest::RegisterProtocolFactory("http",
&GViewRequestInterceptorTest::Factory);
interceptor_ = GViewRequestInterceptor::GetGViewRequestInterceptor();
ASSERT_TRUE(PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path_));
}
virtual void TearDown() {
- URLRequest::RegisterProtocolFactory("http", NULL);
+ net::URLRequest::RegisterProtocolFactory("http", NULL);
message_loop_.RunAllPending();
}
- static URLRequestJob* Factory(URLRequest* request,
+ static URLRequestJob* Factory(net::URLRequest* request,
const std::string& scheme) {
return new GViewURLRequestTestJob(request);
}
@@ -101,12 +101,12 @@ class GViewRequestInterceptorTest : public testing::Test {
protected:
MessageLoopForIO message_loop_;
TestDelegate test_delegate_;
- URLRequest::Interceptor* interceptor_;
+ net::URLRequest::Interceptor* interceptor_;
FilePath pdf_path_;
};
TEST_F(GViewRequestInterceptorTest, DoNotInterceptHtml) {
- URLRequest request(GURL("http://foo.com/index.html"), &test_delegate_);
+ net::URLRequest request(GURL("http://foo.com/index.html"), &test_delegate_);
request.Start();
MessageLoop::current()->Run();
EXPECT_EQ(0, test_delegate_.received_redirect_count());
@@ -114,7 +114,7 @@ TEST_F(GViewRequestInterceptorTest, DoNotInterceptHtml) {
}
TEST_F(GViewRequestInterceptorTest, DoNotInterceptDownload) {
- URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
+ net::URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
request.set_load_flags(net::LOAD_IS_DOWNLOAD);
request.Start();
MessageLoop::current()->Run();
@@ -132,7 +132,7 @@ TEST_F(GViewRequestInterceptorTest, DoNotInterceptPdfWhenEnabled) {
EXPECT_TRUE(pdf_plugin_enabled);
}
- URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
+ net::URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
request.Start();
MessageLoop::current()->Run();
EXPECT_EQ(0, test_delegate_.received_redirect_count());
@@ -149,7 +149,7 @@ TEST_F(GViewRequestInterceptorTest, InterceptPdfWhenDisabled) {
EXPECT_TRUE(pdf_plugin_disabled);
}
- URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
+ net::URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
request.Start();
MessageLoop::current()->Run();
EXPECT_EQ(1, test_delegate_.received_redirect_count());
@@ -162,7 +162,7 @@ TEST_F(GViewRequestInterceptorTest, InterceptPdfWithNoPlugin) {
bool enabled;
SetPDFPluginLoadedState(false, &enabled);
- URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
+ net::URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
request.Start();
MessageLoop::current()->Run();
EXPECT_EQ(1, test_delegate_.received_redirect_count());
@@ -171,7 +171,7 @@ TEST_F(GViewRequestInterceptorTest, InterceptPdfWithNoPlugin) {
}
TEST_F(GViewRequestInterceptorTest, InterceptPowerpoint) {
- URLRequest request(GURL("http://foo.com/file.ppt"), &test_delegate_);
+ net::URLRequest request(GURL("http://foo.com/file.ppt"), &test_delegate_);
request.Start();
MessageLoop::current()->Run();
EXPECT_EQ(1, test_delegate_.received_redirect_count());

Powered by Google App Engine
This is Rietveld 408576698