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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <list> |
| 11 #include <map> |
10 #include <string> | 12 #include <string> |
11 | 13 |
12 #include "content/browser/web_contents/web_contents_impl.h" | 14 #include "content/browser/web_contents/web_contents_impl.h" |
13 #include "content/public/test/web_contents_tester.h" | 15 #include "content/public/test/web_contents_tester.h" |
14 #include "content/test/test_render_frame_host.h" | 16 #include "content/test/test_render_frame_host.h" |
15 #include "content/test/test_render_view_host.h" | 17 #include "content/test/test_render_view_host.h" |
16 #include "ui/base/page_transition_types.h" | 18 #include "ui/base/page_transition_types.h" |
17 | 19 |
18 class GURL; | 20 class GURL; |
19 class Referrer; | 21 class Referrer; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void TestDidNavigateWithSequenceNumber(RenderFrameHost* render_frame_host, | 68 void TestDidNavigateWithSequenceNumber(RenderFrameHost* render_frame_host, |
67 int nav_entry_id, | 69 int nav_entry_id, |
68 bool did_create_new_entry, | 70 bool did_create_new_entry, |
69 const GURL& url, | 71 const GURL& url, |
70 const Referrer& referrer, | 72 const Referrer& referrer, |
71 ui::PageTransition transition, | 73 ui::PageTransition transition, |
72 bool was_within_same_page, | 74 bool was_within_same_page, |
73 int item_sequence_number, | 75 int item_sequence_number, |
74 int document_sequence_number); | 76 int document_sequence_number); |
75 const std::string& GetSaveFrameHeaders() override; | 77 const std::string& GetSaveFrameHeaders() override; |
| 78 bool TestDidDownloadImage( |
| 79 const GURL& url, |
| 80 int http_status_code, |
| 81 const std::vector<SkBitmap>& bitmaps, |
| 82 const std::vector<gfx::Size>& original_bitmap_sizes) override; |
76 | 83 |
77 // True if a cross-site navigation is pending. | 84 // True if a cross-site navigation is pending. |
78 bool CrossProcessNavigationPending(); | 85 bool CrossProcessNavigationPending(); |
79 | 86 |
80 // Prevent interaction with views. | 87 // Prevent interaction with views. |
81 bool CreateRenderViewForRenderManager( | 88 bool CreateRenderViewForRenderManager( |
82 RenderViewHost* render_view_host, | 89 RenderViewHost* render_view_host, |
83 int opener_frame_routing_id, | 90 int opener_frame_routing_id, |
84 int proxy_routing_id, | 91 int proxy_routing_id, |
85 const FrameReplicationState& replicated_frame_state) override; | 92 const FrameReplicationState& replicated_frame_state) override; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 const Referrer& referrer, | 161 const Referrer& referrer, |
155 const std::string& headers) override; | 162 const std::string& headers) override; |
156 | 163 |
157 RenderViewHostDelegateView* delegate_view_override_; | 164 RenderViewHostDelegateView* delegate_view_override_; |
158 | 165 |
159 // Expectations for arguments of |SetHistoryOffsetAndLength()|. | 166 // Expectations for arguments of |SetHistoryOffsetAndLength()|. |
160 bool expect_set_history_offset_and_length_; | 167 bool expect_set_history_offset_and_length_; |
161 int expect_set_history_offset_and_length_history_offset_; | 168 int expect_set_history_offset_and_length_history_offset_; |
162 int expect_set_history_offset_and_length_history_length_; | 169 int expect_set_history_offset_and_length_history_length_; |
163 std::string save_frame_headers_; | 170 std::string save_frame_headers_; |
| 171 // Map keyed by image URL. Values are <id, callback> pairs. |
| 172 std::map<GURL, std::list<std::pair<int, ImageDownloadCallback>>> |
| 173 pending_image_downloads_; |
164 }; | 174 }; |
165 | 175 |
166 } // namespace content | 176 } // namespace content |
167 | 177 |
168 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 178 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
OLD | NEW |