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

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

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_navigation_manager.mm ('k') | ios/web/public/test/test_web_client.mm » ('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.h
diff --git a/ios/web/public/test/test_web_client.h b/ios/web/public/test/test_web_client.h
deleted file mode 100644
index 08ad50776556caa93f6805c87f7c45bd036ee818..0000000000000000000000000000000000000000
--- a/ios/web/public/test/test_web_client.h
+++ /dev/null
@@ -1,61 +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.
-
-#ifndef IOS_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_
-#define IOS_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_
-
-#import <Foundation/Foundation.h>
-
-#include "base/compiler_specific.h"
-#import "base/mac/scoped_nsobject.h"
-#import "ios/web/public/web_client.h"
-#include "net/ssl/ssl_info.h"
-#include "url/gurl.h"
-
-namespace web {
-
-// A WebClient used for testing purposes.
-class TestWebClient : public web::WebClient {
- public:
- TestWebClient();
- ~TestWebClient() override;
-
- // WebClient implementation.
- void AddAdditionalSchemes(std::vector<url::SchemeWithType>*) const override;
- // Returns true for kTestWebUIScheme URL scheme.
- bool IsAppSpecificURL(const GURL& url) const override;
- base::RefCountedMemory* GetDataResourceBytes(int id) const override;
- NSString* GetEarlyPageScript() const override;
- void AllowCertificateError(WebState*,
- int cert_error,
- const net::SSLInfo&,
- const GURL&,
- bool overridable,
- const base::Callback<void(bool)>&) override;
-
- // Changes Early Page Script for testing purposes.
- void SetEarlyPageScript(NSString* page_script);
-
- // Accessors for last arguments passed to AllowCertificateError.
- int last_cert_error_code() const { return last_cert_error_code_; };
- const net::SSLInfo& last_cert_error_ssl_info() const {
- return last_cert_error_ssl_info_;
- }
- const GURL& last_cert_error_request_url() const {
- return last_cert_error_request_url_;
- }
- bool last_cert_error_overridable() { return last_cert_error_overridable_; }
-
- private:
- base::scoped_nsobject<NSString> early_page_script_;
- // Last arguments passed to AllowCertificateError.
- int last_cert_error_code_;
- net::SSLInfo last_cert_error_ssl_info_;
- GURL last_cert_error_request_url_;
- bool last_cert_error_overridable_;
-};
-
-} // namespace web
-
-#endif // IOS_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_
« no previous file with comments | « ios/web/public/test/test_navigation_manager.mm ('k') | ios/web/public/test/test_web_client.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698