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

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

Issue 1137563002: Tests for "Save Image As..." when Data Saver is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head Created 5 years, 7 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 <string>
9
8 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/public/test/web_contents_tester.h" 11 #include "content/public/test/web_contents_tester.h"
10 #include "content/test/test_render_frame_host.h" 12 #include "content/test/test_render_frame_host.h"
11 #include "content/test/test_render_view_host.h" 13 #include "content/test/test_render_view_host.h"
12 #include "ui/base/page_transition_types.h" 14 #include "ui/base/page_transition_types.h"
13 15
16 class GURL;
17 class Referrer;
14 class SiteInstanceImpl; 18 class SiteInstanceImpl;
15 19
16 namespace content { 20 namespace content {
17 21
18 class RenderViewHost; 22 class RenderViewHost;
19 class TestRenderViewHost; 23 class TestRenderViewHost;
20 class WebContentsTester; 24 class WebContentsTester;
21 25
22 // Subclass WebContentsImpl to ensure it creates TestRenderViewHosts 26 // Subclass WebContentsImpl to ensure it creates TestRenderViewHosts
23 // and does not do anything involving views. 27 // and does not do anything involving views.
(...skipping 20 matching lines...) Expand all
44 bool did_create_new_entry, 48 bool did_create_new_entry,
45 const GURL& url, 49 const GURL& url,
46 ui::PageTransition transition) override; 50 ui::PageTransition transition) override;
47 void TestDidNavigateWithReferrer(RenderFrameHost* render_frame_host, 51 void TestDidNavigateWithReferrer(RenderFrameHost* render_frame_host,
48 int page_id, 52 int page_id,
49 int nav_entry_id, 53 int nav_entry_id,
50 bool did_create_new_entry, 54 bool did_create_new_entry,
51 const GURL& url, 55 const GURL& url,
52 const Referrer& referrer, 56 const Referrer& referrer,
53 ui::PageTransition transition) override; 57 ui::PageTransition transition) override;
58 const std::string& GetSaveFrameHeaders() override;
54 59
55 // True if a cross-site navigation is pending. 60 // True if a cross-site navigation is pending.
56 bool CrossProcessNavigationPending(); 61 bool CrossProcessNavigationPending();
57 62
58 // Prevent interaction with views. 63 // Prevent interaction with views.
59 bool CreateRenderViewForRenderManager(RenderViewHost* render_view_host, 64 bool CreateRenderViewForRenderManager(RenderViewHost* render_view_host,
60 int opener_route_id, 65 int opener_route_id,
61 int proxy_routing_id, 66 int proxy_routing_id,
62 bool for_main_frame) override; 67 bool for_main_frame) override;
63 void UpdateRenderViewSizeForRenderManager() override {} 68 void UpdateRenderViewSizeForRenderManager() override {}
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void CreateNewWidget(int render_process_id, 114 void CreateNewWidget(int render_process_id,
110 int route_id, 115 int route_id,
111 blink::WebPopupType popup_type) override; 116 blink::WebPopupType popup_type) override;
112 void CreateNewFullscreenWidget(int render_process_id, int route_id) override; 117 void CreateNewFullscreenWidget(int render_process_id, int route_id) override;
113 void ShowCreatedWindow(int route_id, 118 void ShowCreatedWindow(int route_id,
114 WindowOpenDisposition disposition, 119 WindowOpenDisposition disposition,
115 const gfx::Rect& initial_rect, 120 const gfx::Rect& initial_rect,
116 bool user_gesture) override; 121 bool user_gesture) override;
117 void ShowCreatedWidget(int route_id, const gfx::Rect& initial_rect) override; 122 void ShowCreatedWidget(int route_id, const gfx::Rect& initial_rect) override;
118 void ShowCreatedFullscreenWidget(int route_id) override; 123 void ShowCreatedFullscreenWidget(int route_id) override;
124 void SaveFrameWithHeaders(const GURL& url,
125 const Referrer& referrer,
126 const std::string& headers) override;
119 127
120 RenderViewHostDelegateView* delegate_view_override_; 128 RenderViewHostDelegateView* delegate_view_override_;
121 129
122 // Expectations for arguments of |SetHistoryOffsetAndLength()|. 130 // Expectations for arguments of |SetHistoryOffsetAndLength()|.
123 bool expect_set_history_offset_and_length_; 131 bool expect_set_history_offset_and_length_;
124 int expect_set_history_offset_and_length_history_offset_; 132 int expect_set_history_offset_and_length_history_offset_;
125 int expect_set_history_offset_and_length_history_length_; 133 int expect_set_history_offset_and_length_history_length_;
134 std::string save_frame_headers_;
126 }; 135 };
127 136
128 } // namespace content 137 } // namespace content
129 138
130 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ 139 #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