| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 } | 281 } |
| 282 | 282 |
| 283 // Deprecated in favor of TestServerPage. | 283 // Deprecated in favor of TestServerPage. |
| 284 // TODO(phajdan.jr): Remove TestServerPageW. | 284 // TODO(phajdan.jr): Remove TestServerPageW. |
| 285 GURL TestServerPageW(const std::wstring& path) { | 285 GURL TestServerPageW(const std::wstring& path) { |
| 286 return TestServerPage(WideToUTF8(path)); | 286 return TestServerPage(WideToUTF8(path)); |
| 287 } | 287 } |
| 288 | 288 |
| 289 virtual bool MakeGETRequest(const std::string& page_name) = 0; | 289 virtual bool MakeGETRequest(const std::string& page_name) = 0; |
| 290 | 290 |
| 291 std::wstring GetDataDirectory() { | 291 FilePath GetDataDirectory() { |
| 292 return launcher_.GetDocumentRootPath().ToWStringHack(); | 292 return launcher_.GetDocumentRootPath(); |
| 293 } | 293 } |
| 294 | 294 |
| 295 protected: | 295 protected: |
| 296 bool Start(net::TestServerLauncher::Protocol protocol, | 296 bool Start(net::TestServerLauncher::Protocol protocol, |
| 297 const std::string& host_name, int port, | 297 const std::string& host_name, int port, |
| 298 const FilePath& document_root, | 298 const FilePath& document_root, |
| 299 const FilePath& cert_path, | 299 const FilePath& cert_path, |
| 300 const std::wstring& file_root_url) { | 300 const std::wstring& file_root_url) { |
| 301 if (!launcher_.Start(protocol, | 301 if (!launcher_.Start(protocol, |
| 302 host_name, port, document_root, cert_path, file_root_url)) | 302 host_name, port, document_root, cert_path, file_root_url)) |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 | 594 |
| 595 MessageLoop::current()->Run(); | 595 MessageLoop::current()->Run(); |
| 596 if (request.is_pending()) | 596 if (request.is_pending()) |
| 597 return false; | 597 return false; |
| 598 | 598 |
| 599 return true; | 599 return true; |
| 600 } | 600 } |
| 601 }; | 601 }; |
| 602 | 602 |
| 603 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 603 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| OLD | NEW |