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

Side by Side Diff: ios/web/public/test/http_server/http_server_util.mm

Issue 2898733003: Split up ios/web:test_support. (Closed)
Patch Set: don't break downstream clients Created 3 years, 6 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 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 #include "ios/web/public/test/http_server_util.h" 5 #include "ios/web/public/test/http_server/http_server_util.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #import "ios/web/public/test/http_server.h" 9 #import "ios/web/public/test/http_server/file_based_response_provider.h"
10 #import "ios/web/public/test/response_providers/file_based_response_provider.h" 10 #import "ios/web/public/test/http_server/html_response_provider.h"
11 #import "ios/web/public/test/response_providers/html_response_provider.h" 11 #import "ios/web/public/test/http_server/http_server.h"
12 12
13 namespace web { 13 namespace web {
14 namespace test { 14 namespace test {
15 15
16 void SetUpSimpleHttpServer(const std::map<GURL, std::string>& responses) { 16 void SetUpSimpleHttpServer(const std::map<GURL, std::string>& responses) {
17 SetUpHttpServer(base::MakeUnique<HtmlResponseProvider>(responses)); 17 SetUpHttpServer(base::MakeUnique<HtmlResponseProvider>(responses));
18 } 18 }
19 19
20 void SetUpSimpleHttpServerWithSetCookies( 20 void SetUpSimpleHttpServerWithSetCookies(
21 const std::map<GURL, std::pair<std::string, std::string>>& responses) { 21 const std::map<GURL, std::pair<std::string, std::string>>& responses) {
(...skipping 15 matching lines...) Expand all
37 } 37 }
38 38
39 void AddResponseProvider(std::unique_ptr<web::ResponseProvider> provider) { 39 void AddResponseProvider(std::unique_ptr<web::ResponseProvider> provider) {
40 web::test::HttpServer& server = web::test::HttpServer::GetSharedInstance(); 40 web::test::HttpServer& server = web::test::HttpServer::GetSharedInstance();
41 DCHECK(server.IsRunning()); 41 DCHECK(server.IsRunning());
42 server.AddResponseProvider(std::move(provider)); 42 server.AddResponseProvider(std::move(provider));
43 } 43 }
44 44
45 } // namespace test 45 } // namespace test
46 } // namespace web 46 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/http_server/http_server_util.h ('k') | ios/web/public/test/http_server/response_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698