| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 IOS_WEB_PUBLIC_TEST_HTTP_SERVER_UTIL_H_ | 5 #ifndef IOS_WEB_PUBLIC_TEST_HTTP_SERVER_UTIL_H_ |
| 6 #define IOS_WEB_PUBLIC_TEST_HTTP_SERVER_UTIL_H_ | 6 #define IOS_WEB_PUBLIC_TEST_HTTP_SERVER_UTIL_H_ |
| 7 | 7 |
| 8 #import <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| 11 | 11 |
| 12 namespace web { | 12 namespace web { |
| 13 namespace test { | 13 namespace test { |
| 14 | 14 |
| 15 // Sets up a web::test::HttpServer with a simple HtmlResponseProvider. The | 15 // Sets up a web::test::HttpServer with a simple HtmlResponseProvider. The |
| 16 // HtmlResponseProvider will use the |responses| map to resolve URLs. | 16 // HtmlResponseProvider will use the |responses| map to resolve URLs. |
| 17 void SetUpSimpleHttpServer(const std::map<GURL, std::string>& responses); | 17 void SetUpSimpleHttpServer(const std::map<GURL, std::string>& responses); |
| 18 | 18 |
| 19 // Sets up a web::test::HttpServer with a FileBasedResponseProvider. The | 19 // Sets up a web::test::HttpServer with a FileBasedResponseProvider. The |
| 20 // server will try to resolve URLs as file paths relative to the application | 20 // server will try to resolve URLs as file paths relative to the application |
| 21 // bundle path. web::test::MakeUrl should be used to rewrite URLs before doing | 21 // bundle path. web::test::MakeUrl should be used to rewrite URLs before doing |
| 22 // a request. | 22 // a request. |
| 23 void SetUpFileBasedHttpServer(); | 23 void SetUpFileBasedHttpServer(); |
| 24 | 24 |
| 25 } // namespace test | 25 } // namespace test |
| 26 } // namespace web | 26 } // namespace web |
| 27 | 27 |
| 28 #endif // IOS_WEB_PUBLIC_TEST_HTTP_SERVER_UTIL_H_ | 28 #endif // IOS_WEB_PUBLIC_TEST_HTTP_SERVER_UTIL_H_ |
| OLD | NEW |