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

Unified Diff: ios/web/public/test/http_server_util.mm

Issue 2898733003: Split up ios/web:test_support. (Closed)
Patch Set: don't break downstream clients Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/public/test/http_server_util.mm
diff --git a/ios/web/public/test/http_server_util.mm b/ios/web/public/test/http_server_util.mm
deleted file mode 100644
index 42276a654929c2fb31295b5cbce413139f0b2be4..0000000000000000000000000000000000000000
--- a/ios/web/public/test/http_server_util.mm
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ios/web/public/test/http_server_util.h"
-
-#include "base/memory/ptr_util.h"
-#include "base/path_service.h"
-#import "ios/web/public/test/http_server.h"
-#import "ios/web/public/test/response_providers/file_based_response_provider.h"
-#import "ios/web/public/test/response_providers/html_response_provider.h"
-
-namespace web {
-namespace test {
-
-void SetUpSimpleHttpServer(const std::map<GURL, std::string>& responses) {
- SetUpHttpServer(base::MakeUnique<HtmlResponseProvider>(responses));
-}
-
-void SetUpSimpleHttpServerWithSetCookies(
- const std::map<GURL, std::pair<std::string, std::string>>& responses) {
- SetUpHttpServer(base::MakeUnique<HtmlResponseProvider>(responses));
-}
-
-void SetUpFileBasedHttpServer() {
- base::FilePath path;
- PathService::Get(base::DIR_MODULE, &path);
- SetUpHttpServer(base::MakeUnique<FileBasedResponseProvider>(path));
-}
-
-void SetUpHttpServer(std::unique_ptr<web::ResponseProvider> provider) {
- web::test::HttpServer& server = web::test::HttpServer::GetSharedInstance();
- DCHECK(server.IsRunning());
-
- server.RemoveAllResponseProviders();
- server.AddResponseProvider(std::move(provider));
-}
-
-void AddResponseProvider(std::unique_ptr<web::ResponseProvider> provider) {
- web::test::HttpServer& server = web::test::HttpServer::GetSharedInstance();
- DCHECK(server.IsRunning());
- server.AddResponseProvider(std::move(provider));
-}
-
-} // namespace test
-} // namespace web
« no previous file with comments | « ios/web/public/test/http_server_util.h ('k') | ios/web/public/test/response_providers/data_response_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698