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

Side by Side Diff: ios/web/public/test/http_server/error_page_response_provider.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 #import "ios/web/public/test/response_providers/error_page_response_provider.h" 5 #import "ios/web/public/test/http_server/error_page_response_provider.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "ios/web/public/test/http_server.h" 8 #import "ios/web/public/test/http_server/http_server.h"
9 #include "net/http/http_status_code.h" 9 #include "net/http/http_status_code.h"
10 10
11 // static 11 // static
12 GURL ErrorPageResponseProvider::GetDnsFailureUrl() { 12 GURL ErrorPageResponseProvider::GetDnsFailureUrl() {
13 return GURL("http://mock/bad"); 13 return GURL("http://mock/bad");
14 } 14 }
15 15
16 // static 16 // static
17 GURL ErrorPageResponseProvider::GetRedirectToDnsFailureUrl() { 17 GURL ErrorPageResponseProvider::GetRedirectToDnsFailureUrl() {
18 return web::test::HttpServer::MakeUrl("http://mock/redirect"); 18 return web::test::HttpServer::MakeUrl("http://mock/redirect");
(...skipping 13 matching lines...) Expand all
32 if (HtmlResponseProvider::CanHandleRequest(request)) { 32 if (HtmlResponseProvider::CanHandleRequest(request)) {
33 HtmlResponseProvider::GetResponseHeadersAndBody(request, headers, 33 HtmlResponseProvider::GetResponseHeadersAndBody(request, headers,
34 response_body); 34 response_body);
35 } else if (request.url == GetRedirectToDnsFailureUrl()) { 35 } else if (request.url == GetRedirectToDnsFailureUrl()) {
36 *headers = web::ResponseProvider::GetRedirectResponseHeaders( 36 *headers = web::ResponseProvider::GetRedirectResponseHeaders(
37 ErrorPageResponseProvider::GetDnsFailureUrl().spec(), net::HTTP_FOUND); 37 ErrorPageResponseProvider::GetDnsFailureUrl().spec(), net::HTTP_FOUND);
38 } else { 38 } else {
39 NOTREACHED(); 39 NOTREACHED();
40 } 40 }
41 } 41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698