OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
6 #define CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 6 #define CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class TestWebContents : public WebContentsImpl, public WebContentsTester { | 28 class TestWebContents : public WebContentsImpl, public WebContentsTester { |
29 public: | 29 public: |
30 ~TestWebContents() override; | 30 ~TestWebContents() override; |
31 | 31 |
32 static TestWebContents* Create(BrowserContext* browser_context, | 32 static TestWebContents* Create(BrowserContext* browser_context, |
33 SiteInstance* instance); | 33 SiteInstance* instance); |
34 | 34 |
35 // WebContentsImpl overrides (returning the same values, but in Test* types) | 35 // WebContentsImpl overrides (returning the same values, but in Test* types) |
36 TestRenderFrameHost* GetMainFrame() override; | 36 TestRenderFrameHost* GetMainFrame() override; |
37 TestRenderViewHost* GetRenderViewHost() const override; | 37 TestRenderViewHost* GetRenderViewHost() const override; |
| 38 // Overrides to avoid establishing Mojo connection with renderer process. |
| 39 int DownloadImage(const GURL& url, |
| 40 bool is_favicon, |
| 41 uint32_t max_bitmap_size, |
| 42 bool bypass_cache, |
| 43 const ImageDownloadCallback& callback) override; |
38 | 44 |
39 // WebContentsTester implementation. | 45 // WebContentsTester implementation. |
40 void CommitPendingNavigation() override; | 46 void CommitPendingNavigation() override; |
41 TestRenderFrameHost* GetPendingMainFrame() const override; | 47 TestRenderFrameHost* GetPendingMainFrame() const override; |
42 void NavigateAndCommit(const GURL& url) override; | 48 void NavigateAndCommit(const GURL& url) override; |
43 void TestSetIsLoading(bool value) override; | 49 void TestSetIsLoading(bool value) override; |
44 void ProceedWithCrossSiteNavigation() override; | 50 void ProceedWithCrossSiteNavigation() override; |
45 void TestDidNavigate(RenderFrameHost* render_frame_host, | 51 void TestDidNavigate(RenderFrameHost* render_frame_host, |
46 int page_id, | 52 int page_id, |
47 int nav_entry_id, | 53 int nav_entry_id, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Expectations for arguments of |SetHistoryOffsetAndLength()|. | 140 // Expectations for arguments of |SetHistoryOffsetAndLength()|. |
135 bool expect_set_history_offset_and_length_; | 141 bool expect_set_history_offset_and_length_; |
136 int expect_set_history_offset_and_length_history_offset_; | 142 int expect_set_history_offset_and_length_history_offset_; |
137 int expect_set_history_offset_and_length_history_length_; | 143 int expect_set_history_offset_and_length_history_length_; |
138 std::string save_frame_headers_; | 144 std::string save_frame_headers_; |
139 }; | 145 }; |
140 | 146 |
141 } // namespace content | 147 } // namespace content |
142 | 148 |
143 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 149 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
OLD | NEW |