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