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 #include "content/test/test_web_contents.h" | 5 #include "content/test/test_web_contents.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/browser_url_handler_impl.h" | 9 #include "content/browser/browser_url_handler_impl.h" |
10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
11 #include "content/browser/renderer_host/test_render_view_host.h" | 11 #include "content/browser/renderer_host/test_render_view_host.h" |
12 #include "content/browser/site_instance_impl.h" | 12 #include "content/browser/site_instance_impl.h" |
13 #include "content/browser/web_contents/navigation_entry_impl.h" | 13 #include "content/browser/web_contents/navigation_entry_impl.h" |
14 #include "content/common/view_messages.h" | 14 #include "content/common/view_messages.h" |
15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
16 #include "content/public/browser/notification_source.h" | 16 #include "content/public/browser/notification_source.h" |
17 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
| 18 #include "content/public/common/page_state.h" |
18 #include "content/public/common/page_transition_types.h" | 19 #include "content/public/common/page_transition_types.h" |
19 #include "content/public/common/password_form.h" | 20 #include "content/public/common/password_form.h" |
20 #include "content/public/test/mock_render_process_host.h" | 21 #include "content/public/test/mock_render_process_host.h" |
21 #include "webkit/glue/glue_serialize.h" | |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 TestWebContents::TestWebContents(BrowserContext* browser_context) | 25 TestWebContents::TestWebContents(BrowserContext* browser_context) |
26 : WebContentsImpl(browser_context, NULL), | 26 : WebContentsImpl(browser_context, NULL), |
27 transition_cross_site(false), | 27 transition_cross_site(false), |
28 delegate_view_override_(NULL), | 28 delegate_view_override_(NULL), |
29 expect_set_history_length_and_prune_(false), | 29 expect_set_history_length_and_prune_(false), |
30 expect_set_history_length_and_prune_site_instance_(NULL), | 30 expect_set_history_length_and_prune_site_instance_(NULL), |
31 expect_set_history_length_and_prune_history_length_(0), | 31 expect_set_history_length_and_prune_history_length_(0), |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 params.transition = transition; | 76 params.transition = transition; |
77 params.redirects = std::vector<GURL>(); | 77 params.redirects = std::vector<GURL>(); |
78 params.should_update_history = false; | 78 params.should_update_history = false; |
79 params.searchable_form_url = GURL(); | 79 params.searchable_form_url = GURL(); |
80 params.searchable_form_encoding = std::string(); | 80 params.searchable_form_encoding = std::string(); |
81 params.password_form = PasswordForm(); | 81 params.password_form = PasswordForm(); |
82 params.security_info = std::string(); | 82 params.security_info = std::string(); |
83 params.gesture = NavigationGestureUser; | 83 params.gesture = NavigationGestureUser; |
84 params.was_within_same_page = false; | 84 params.was_within_same_page = false; |
85 params.is_post = false; | 85 params.is_post = false; |
86 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url)); | 86 params.page_state = PageState::CreateFromURL(url); |
87 | 87 |
88 DidNavigate(render_view_host, params); | 88 DidNavigate(render_view_host, params); |
89 } | 89 } |
90 | 90 |
91 WebPreferences TestWebContents::TestGetWebkitPrefs() { | 91 WebPreferences TestWebContents::TestGetWebkitPrefs() { |
92 return GetWebkitPrefs(); | 92 return GetWebkitPrefs(); |
93 } | 93 } |
94 | 94 |
95 bool TestWebContents::CreateRenderViewForRenderManager( | 95 bool TestWebContents::CreateRenderViewForRenderManager( |
96 RenderViewHost* render_view_host, int opener_route_id) { | 96 RenderViewHost* render_view_host, int opener_route_id) { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 239 } |
240 | 240 |
241 void TestWebContents::ShowCreatedWidget(int route_id, | 241 void TestWebContents::ShowCreatedWidget(int route_id, |
242 const gfx::Rect& initial_pos) { | 242 const gfx::Rect& initial_pos) { |
243 } | 243 } |
244 | 244 |
245 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 245 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
246 } | 246 } |
247 | 247 |
248 } // namespace content | 248 } // namespace content |
OLD | NEW |