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

Side by Side Diff: ios/web/public/test/http_server_util.h

Issue 2285773002: Ability to add ResponseProvider (Closed)
Patch Set: Address review comments Created 4 years, 3 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
« no previous file with comments | « no previous file | ios/web/public/test/http_server_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <map> 8 #include <map>
9 9
10 #include "url/gurl.h" 10 #include "url/gurl.h"
(...skipping 11 matching lines...) Expand all
22 // Sets up a web::test::HttpServer with a FileBasedResponseProvider. The 22 // Sets up a web::test::HttpServer with a FileBasedResponseProvider. The
23 // server will try to resolve URLs as file paths relative to the application 23 // server will try to resolve URLs as file paths relative to the application
24 // bundle path. web::test::MakeUrl should be used to rewrite URLs before doing 24 // bundle path. web::test::MakeUrl should be used to rewrite URLs before doing
25 // a request. 25 // a request.
26 void SetUpFileBasedHttpServer(); 26 void SetUpFileBasedHttpServer();
27 27
28 // Sets up a web::test::HttpServer with a single custom provider. 28 // Sets up a web::test::HttpServer with a single custom provider.
29 // Takes ownership of the provider. 29 // Takes ownership of the provider.
30 void SetUpHttpServer(std::unique_ptr<web::ResponseProvider> provider); 30 void SetUpHttpServer(std::unique_ptr<web::ResponseProvider> provider);
31 31
32 // Adds a single custom provider.
33 // Takes ownership of the provider.
34 void AddResponseProvider(std::unique_ptr<web::ResponseProvider> provider);
32 } // namespace test 35 } // namespace test
33 } // namespace web 36 } // namespace web
34 37
35 #endif // IOS_WEB_PUBLIC_TEST_HTTP_SERVER_UTIL_H_ 38 #endif // IOS_WEB_PUBLIC_TEST_HTTP_SERVER_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ios/web/public/test/http_server_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698