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

Unified Diff: ios/web/public/test/test_web_state.cc

Issue 1022463002: [iOS] Upstream files in //ios/chrome/browser/autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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_state.h ('k') | ios/web/public/web_state/crw_web_view_proxy.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_state.cc
diff --git a/ios/web/public/test/test_web_state.cc b/ios/web/public/test/test_web_state.cc
index 220b6487060ab4f2423b4116f99aa9ca0d2b90a9..f98f28cb1295387afa1c595f5fa8bda6cafe0941 100644
--- a/ios/web/public/test/test_web_state.cc
+++ b/ios/web/public/test/test_web_state.cc
@@ -6,6 +6,19 @@
namespace web {
+TestWebState::TestWebState() : trust_level_(kAbsolute), content_is_html_(true) {
+}
+
+TestWebState::~TestWebState() = default;
+
+UIView* TestWebState::GetView() {
+ return nullptr;
+}
+
+WebViewType TestWebState::GetWebViewType() const {
+ return web::UI_WEB_VIEW_TYPE;
+}
+
BrowserState* TestWebState::GetBrowserState() const {
return nullptr;
}
@@ -27,7 +40,7 @@ const std::string& TestWebState::GetContentLanguageHeader() const {
}
bool TestWebState::ContentIsHTML() const {
- return true;
+ return content_is_html_;
}
const GURL& TestWebState::GetVisibleURL() const {
@@ -38,4 +51,33 @@ const GURL& TestWebState::GetLastCommittedURL() const {
return url_;
}
+GURL TestWebState::GetCurrentURL(URLVerificationTrustLevel* trust_level) const {
+ *trust_level = trust_level_;
+ return url_;
+}
+
+bool TestWebState::IsShowingWebInterstitial() const {
+ return false;
+}
+
+WebInterstitial* TestWebState::GetWebInterstitial() const {
+ return nullptr;
+}
+
+void TestWebState::SetContentIsHTML(bool content_is_html) {
+ content_is_html_ = content_is_html;
+}
+
+void TestWebState::SetCurrentURL(const GURL& url) {
+ url_ = url;
+}
+
+void TestWebState::SetTrustLevel(URLVerificationTrustLevel trust_level) {
+ trust_level_ = trust_level;
+}
+
+CRWWebViewProxyType TestWebState::GetWebViewProxy() const {
+ return nullptr;
+}
+
} // namespace web
« no previous file with comments | « ios/web/public/test/test_web_state.h ('k') | ios/web/public/web_state/crw_web_view_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698