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

Side by Side Diff: net/url_request/url_request_unittest.h

Issue 1814002: Remove deprecated things from net test suite: (Closed)
Patch Set: Created 10 years, 7 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 unified diff | Download patch
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 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <sstream> 10 #include <sstream>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ssl_config_service_, 167 ssl_config_service_,
168 http_auth_handler_factory_), 168 http_auth_handler_factory_),
169 disk_cache::CreateInMemoryCacheBackend(0)); 169 disk_cache::CreateInMemoryCacheBackend(0));
170 // In-memory cookie store. 170 // In-memory cookie store.
171 cookie_store_ = new net::CookieMonster(NULL, NULL); 171 cookie_store_ = new net::CookieMonster(NULL, NULL);
172 accept_language_ = "en-us,fr"; 172 accept_language_ = "en-us,fr";
173 accept_charset_ = "iso-8859-1,*,utf-8"; 173 accept_charset_ = "iso-8859-1,*,utf-8";
174 } 174 }
175 }; 175 };
176 176
177 // TODO(phajdan.jr): Migrate callers to the new name and remove the typedef.
178 typedef TestURLRequestContext URLRequestTestContext;
179
180 //----------------------------------------------------------------------------- 177 //-----------------------------------------------------------------------------
181 178
182 class TestURLRequest : public URLRequest { 179 class TestURLRequest : public URLRequest {
183 public: 180 public:
184 TestURLRequest(const GURL& url, Delegate* delegate) 181 TestURLRequest(const GURL& url, Delegate* delegate)
185 : URLRequest(url, delegate) { 182 : URLRequest(url, delegate) {
186 set_context(new TestURLRequestContext()); 183 set_context(new TestURLRequestContext());
187 } 184 }
188 }; 185 };
189 186
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // TODO(phajdan.jr): Check for problems with IPv6. 421 // TODO(phajdan.jr): Check for problems with IPv6.
425 422
426 if (password.empty()) 423 if (password.empty())
427 return GURL(scheme_ + "://" + user + "@" + 424 return GURL(scheme_ + "://" + user + "@" +
428 host_name_ + ":" + port_str_ + "/" + path); 425 host_name_ + ":" + port_str_ + "/" + path);
429 426
430 return GURL(scheme_ + "://" + user + ":" + password + 427 return GURL(scheme_ + "://" + user + ":" + password +
431 "@" + host_name_ + ":" + port_str_ + "/" + path); 428 "@" + host_name_ + ":" + port_str_ + "/" + path);
432 } 429 }
433 430
434 // Deprecated in favor of TestServerPage.
435 // TODO(phajdan.jr): Remove TestServerPageW.
436 GURL TestServerPageW(const std::wstring& path) {
437 return TestServerPage(WideToUTF8(path));
438 }
439
440 virtual bool MakeGETRequest(const std::string& page_name) = 0; 431 virtual bool MakeGETRequest(const std::string& page_name) = 0;
441 432
442 FilePath GetDataDirectory() { 433 FilePath GetDataDirectory() {
443 return launcher_.GetDocumentRootPath(); 434 return launcher_.GetDocumentRootPath();
444 } 435 }
445 436
446 protected: 437 protected:
447 friend class base::RefCounted<BaseTestServer>; 438 friend class base::RefCounted<BaseTestServer>;
448 virtual ~BaseTestServer() { } 439 virtual ~BaseTestServer() { }
449 440
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 return false; 750 return false;
760 751
761 return true; 752 return true;
762 } 753 }
763 754
764 private: 755 private:
765 ~FTPTestServer() {} 756 ~FTPTestServer() {}
766 }; 757 };
767 758
768 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 759 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698