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

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

Issue 2614443004: [ios] Moved all web mocks to ios/web/public/test/fakes. (Closed)
Patch Set: Moved test_redirect_observer back Created 3 years, 11 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
« no previous file with comments | « ios/web/public/test/test_web_client.h ('k') | ios/web/public/test/test_web_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/test_web_client.mm
diff --git a/ios/web/public/test/test_web_client.mm b/ios/web/public/test/test_web_client.mm
deleted file mode 100644
index 8440a68f9470c650b3d72ecf2eae1acc3f4976db..0000000000000000000000000000000000000000
--- a/ios/web/public/test/test_web_client.mm
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 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.
-
-#import "ios/web/public/test/test_web_client.h"
-
-#include "base/logging.h"
-#include "ios/web/test/test_url_constants.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "url/gurl.h"
-
-namespace web {
-
-TestWebClient::TestWebClient()
- : last_cert_error_code_(0), last_cert_error_overridable_(true) {}
-
-TestWebClient::~TestWebClient() {}
-
-void TestWebClient::AddAdditionalSchemes(
- std::vector<url::SchemeWithType>* additional_standard_schemes) const {
- url::SchemeWithType scheme = {kTestWebUIScheme, url::SCHEME_WITHOUT_PORT};
- additional_standard_schemes->push_back(scheme);
-}
-
-bool TestWebClient::IsAppSpecificURL(const GURL& url) const {
- return url.SchemeIs(kTestWebUIScheme);
-}
-
-base::RefCountedMemory* TestWebClient::GetDataResourceBytes(
- int resource_id) const {
- if (!ResourceBundle::HasSharedInstance())
- return nullptr;
- return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
-}
-
-NSString* TestWebClient::GetEarlyPageScript() const {
- return early_page_script_ ? early_page_script_.get() : @"";
-}
-
-void TestWebClient::SetEarlyPageScript(NSString* page_script) {
- early_page_script_.reset([page_script copy]);
-}
-
-void TestWebClient::AllowCertificateError(
- WebState* web_state,
- int cert_error,
- const net::SSLInfo& ssl_info,
- const GURL& request_url,
- bool overridable,
- const base::Callback<void(bool)>& callback) {
- last_cert_error_code_ = cert_error;
- last_cert_error_ssl_info_ = ssl_info;
- last_cert_error_request_url_ = request_url;
- last_cert_error_overridable_ = overridable;
-
- callback.Run(false);
-}
-
-} // namespace web
« no previous file with comments | « ios/web/public/test/test_web_client.h ('k') | ios/web/public/test/test_web_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698