Add ICU message format support
[chromium-blink-merge.git] / ios / web / public / test / test_web_state.cc
blobd8d5a4072eb611482045f66df8cef38d5de6fdfa
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ios/web/public/test/test_web_state.h"
7 namespace web {
9 TestWebState::TestWebState() : trust_level_(kAbsolute), content_is_html_(true) {
12 TestWebState::~TestWebState() = default;
14 UIView* TestWebState::GetView() {
15 return nullptr;
18 WebViewType TestWebState::GetWebViewType() const {
19 return web::UI_WEB_VIEW_TYPE;
22 BrowserState* TestWebState::GetBrowserState() const {
23 return nullptr;
26 NavigationManager* TestWebState::GetNavigationManager() {
27 return nullptr;
30 CRWJSInjectionReceiver* TestWebState::GetJSInjectionReceiver() const {
31 return nullptr;
34 const std::string& TestWebState::GetContentsMimeType() const {
35 return mime_type_;
38 const std::string& TestWebState::GetContentLanguageHeader() const {
39 return content_language_;
42 bool TestWebState::ContentIsHTML() const {
43 return content_is_html_;
46 const GURL& TestWebState::GetVisibleURL() const {
47 return url_;
50 const GURL& TestWebState::GetLastCommittedURL() const {
51 return url_;
54 GURL TestWebState::GetCurrentURL(URLVerificationTrustLevel* trust_level) const {
55 *trust_level = trust_level_;
56 return url_;
59 bool TestWebState::IsShowingWebInterstitial() const {
60 return false;
63 WebInterstitial* TestWebState::GetWebInterstitial() const {
64 return nullptr;
67 void TestWebState::SetContentIsHTML(bool content_is_html) {
68 content_is_html_ = content_is_html;
71 const base::string16& TestWebState::GetTitle() const {
72 return title_;
75 bool TestWebState::IsLoading() const {
76 return false;
79 void TestWebState::SetCurrentURL(const GURL& url) {
80 url_ = url;
83 void TestWebState::SetTrustLevel(URLVerificationTrustLevel trust_level) {
84 trust_level_ = trust_level;
87 CRWWebViewProxyType TestWebState::GetWebViewProxy() const {
88 return nullptr;
91 int TestWebState::DownloadImage(const GURL& url,
92 bool is_favicon,
93 uint32_t max_bitmap_size,
94 bool bypass_cache,
95 const ImageDownloadCallback& callback) {
96 return 0;
99 } // namespace web