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

Side by Side Diff: content/test/test_web_contents.h

Issue 2697803003: Improve test coverage for ContentFaviconDriver (Closed)
Patch Set: Minor test renames. Created 3 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 unified diff | Download patch
« no previous file with comments | « content/public/test/web_contents_tester.h ('k') | content/test/test_web_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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;
22 class SkBitmap;
23
24 namespace gfx {
25 class Size;
26 }
20 27
21 namespace content { 28 namespace content {
22 29
23 class NavigationData; 30 class NavigationData;
24 class NavigationHandle; 31 class NavigationHandle;
25 class RenderViewHost; 32 class RenderViewHost;
26 class TestRenderViewHost; 33 class TestRenderViewHost;
27 class WebContentsTester; 34 class WebContentsTester;
28 35
29 // Subclass WebContentsImpl to ensure it creates TestRenderViewHosts 36 // Subclass WebContentsImpl to ensure it creates TestRenderViewHosts
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void TestDidNavigateWithSequenceNumber(RenderFrameHost* render_frame_host, 73 void TestDidNavigateWithSequenceNumber(RenderFrameHost* render_frame_host,
67 int nav_entry_id, 74 int nav_entry_id,
68 bool did_create_new_entry, 75 bool did_create_new_entry,
69 const GURL& url, 76 const GURL& url,
70 const Referrer& referrer, 77 const Referrer& referrer,
71 ui::PageTransition transition, 78 ui::PageTransition transition,
72 bool was_within_same_page, 79 bool was_within_same_page,
73 int item_sequence_number, 80 int item_sequence_number,
74 int document_sequence_number); 81 int document_sequence_number);
75 const std::string& GetSaveFrameHeaders() override; 82 const std::string& GetSaveFrameHeaders() override;
83 bool HasPendingDownloadImage(const GURL& url) override;
84 bool TestDidDownloadImage(
85 const GURL& url,
86 int http_status_code,
87 const std::vector<SkBitmap>& bitmaps,
88 const std::vector<gfx::Size>& original_bitmap_sizes) override;
76 89
77 // True if a cross-site navigation is pending. 90 // True if a cross-site navigation is pending.
78 bool CrossProcessNavigationPending(); 91 bool CrossProcessNavigationPending();
79 92
80 // Prevent interaction with views. 93 // Prevent interaction with views.
81 bool CreateRenderViewForRenderManager( 94 bool CreateRenderViewForRenderManager(
82 RenderViewHost* render_view_host, 95 RenderViewHost* render_view_host,
83 int opener_frame_routing_id, 96 int opener_frame_routing_id,
84 int proxy_routing_id, 97 int proxy_routing_id,
85 const FrameReplicationState& replicated_frame_state) override; 98 const FrameReplicationState& replicated_frame_state) override;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const Referrer& referrer, 167 const Referrer& referrer,
155 const std::string& headers) override; 168 const std::string& headers) override;
156 169
157 RenderViewHostDelegateView* delegate_view_override_; 170 RenderViewHostDelegateView* delegate_view_override_;
158 171
159 // Expectations for arguments of |SetHistoryOffsetAndLength()|. 172 // Expectations for arguments of |SetHistoryOffsetAndLength()|.
160 bool expect_set_history_offset_and_length_; 173 bool expect_set_history_offset_and_length_;
161 int expect_set_history_offset_and_length_history_offset_; 174 int expect_set_history_offset_and_length_history_offset_;
162 int expect_set_history_offset_and_length_history_length_; 175 int expect_set_history_offset_and_length_history_length_;
163 std::string save_frame_headers_; 176 std::string save_frame_headers_;
177 // Map keyed by image URL. Values are <id, callback> pairs.
178 std::map<GURL, std::list<std::pair<int, ImageDownloadCallback>>>
179 pending_image_downloads_;
164 }; 180 };
165 181
166 } // namespace content 182 } // namespace content
167 183
168 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ 184 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/public/test/web_contents_tester.h ('k') | content/test/test_web_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698