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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl_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 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return GURL(base_url.spec() + "/" + relpath); 69 return GURL(base_url.spec() + "/" + relpath);
70 } 70 }
71 71
72 class ProxyScriptFetcherImplTest : public PlatformTest { 72 class ProxyScriptFetcherImplTest : public PlatformTest {
73 public: 73 public:
74 ProxyScriptFetcherImplTest() 74 ProxyScriptFetcherImplTest()
75 : test_server_(net::TestServer::TYPE_HTTP, FilePath(kDocRoot)) { 75 : test_server_(net::TestServer::TYPE_HTTP, FilePath(kDocRoot)) {
76 } 76 }
77 77
78 static void SetUpTestCase() { 78 static void SetUpTestCase() {
79 URLRequest::AllowFileAccess(); 79 net::URLRequest::AllowFileAccess();
80 } 80 }
81 81
82 protected: 82 protected:
83 net::TestServer test_server_; 83 net::TestServer test_server_;
84 }; 84 };
85 85
86 TEST_F(ProxyScriptFetcherImplTest, FileUrl) { 86 TEST_F(ProxyScriptFetcherImplTest, FileUrl) {
87 scoped_refptr<URLRequestContext> context(new RequestContext); 87 scoped_refptr<URLRequestContext> context(new RequestContext);
88 ProxyScriptFetcherImpl pac_fetcher(context); 88 ProxyScriptFetcherImpl pac_fetcher(context);
89 89
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 string16 text; 322 string16 text;
323 TestCompletionCallback callback; 323 TestCompletionCallback callback;
324 int result = pac_fetcher.Fetch(url, &text, &callback); 324 int result = pac_fetcher.Fetch(url, &text, &callback);
325 EXPECT_EQ(ERR_IO_PENDING, result); 325 EXPECT_EQ(ERR_IO_PENDING, result);
326 EXPECT_EQ(OK, callback.WaitForResult()); 326 EXPECT_EQ(OK, callback.WaitForResult());
327 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text); 327 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text);
328 } 328 }
329 } 329 }
330 330
331 } // namespace net 331 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698