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

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

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/ios_web.gyp ('k') | ios/web/public/test/test_web_state.cc » ('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.h
diff --git a/ios/web/public/test/test_web_state.h b/ios/web/public/test/test_web_state.h
index ac89a7fe03606555b5bad01007ede7606ce78d6f..563ad342d00cbc7961bcdc160916bb6d43a92a15 100644
--- a/ios/web/public/test/test_web_state.h
+++ b/ios/web/public/test/test_web_state.h
@@ -7,6 +7,7 @@
#include <string>
+#include "ios/web/public/web_state/url_verification_constants.h"
#include "ios/web/public/web_state/web_state.h"
#include "url/gurl.h"
@@ -15,7 +16,12 @@ namespace web {
// Minimal implementation of WebState, to be used in tests.
class TestWebState : public WebState {
public:
+ TestWebState();
+ ~TestWebState() override;
+
// WebState implementation.
+ UIView* GetView() override;
+ WebViewType GetWebViewType() const override;
BrowserState* GetBrowserState() const override;
void OpenURL(const OpenURLParams& params) override {}
NavigationManager* GetNavigationManager() override;
@@ -25,15 +31,26 @@ class TestWebState : public WebState {
bool ContentIsHTML() const override;
const GURL& GetVisibleURL() const override;
const GURL& GetLastCommittedURL() const override;
+ GURL GetCurrentURL(URLVerificationTrustLevel* trust_level) const override;
void AddScriptCommandCallback(const ScriptCommandCallback& callback,
const std::string& command_prefix) override {}
void RemoveScriptCommandCallback(const std::string& command_prefix) override {
}
+ CRWWebViewProxyType GetWebViewProxy() const override;
+ bool IsShowingWebInterstitial() const override;
+ WebInterstitial* GetWebInterstitial() const override;
void AddObserver(WebStateObserver* observer) override {}
void RemoveObserver(WebStateObserver* observer) override {}
+ // Setters for test data.
+ void SetContentIsHTML(bool content_is_html);
+ void SetCurrentURL(const GURL& url);
+ void SetTrustLevel(URLVerificationTrustLevel trust_level);
+
private:
GURL url_;
+ URLVerificationTrustLevel trust_level_;
+ bool content_is_html_;
std::string mime_type_;
std::string content_language_;
};
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/public/test/test_web_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698