| 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/browser/web_contents/test_web_contents.h" | 5 #include "content/browser/web_contents/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_transition_types.h" | 18 #include "content/public/common/page_transition_types.h" |
| 19 #include "content/public/common/password_form.h" |
| 19 #include "content/public/test/mock_render_process_host.h" | 20 #include "content/public/test/mock_render_process_host.h" |
| 20 #include "webkit/forms/password_form.h" | |
| 21 #include "webkit/glue/webkit_glue.h" | 21 #include "webkit/glue/webkit_glue.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), |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ViewHostMsg_FrameNavigate_Params params; | 70 ViewHostMsg_FrameNavigate_Params params; |
| 71 | 71 |
| 72 params.page_id = page_id; | 72 params.page_id = page_id; |
| 73 params.url = url; | 73 params.url = url; |
| 74 params.referrer = referrer; | 74 params.referrer = referrer; |
| 75 params.transition = transition; | 75 params.transition = transition; |
| 76 params.redirects = std::vector<GURL>(); | 76 params.redirects = std::vector<GURL>(); |
| 77 params.should_update_history = false; | 77 params.should_update_history = false; |
| 78 params.searchable_form_url = GURL(); | 78 params.searchable_form_url = GURL(); |
| 79 params.searchable_form_encoding = std::string(); | 79 params.searchable_form_encoding = std::string(); |
| 80 params.password_form = webkit::forms::PasswordForm(); | 80 params.password_form = content::PasswordForm(); |
| 81 params.security_info = std::string(); | 81 params.security_info = std::string(); |
| 82 params.gesture = NavigationGestureUser; | 82 params.gesture = NavigationGestureUser; |
| 83 params.was_within_same_page = false; | 83 params.was_within_same_page = false; |
| 84 params.is_post = false; | 84 params.is_post = false; |
| 85 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url)); | 85 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url)); |
| 86 | 86 |
| 87 DidNavigate(render_view_host, params); | 87 DidNavigate(render_view_host, params); |
| 88 } | 88 } |
| 89 | 89 |
| 90 webkit_glue::WebPreferences TestWebContents::TestGetWebkitPrefs() { | 90 webkit_glue::WebPreferences TestWebContents::TestGetWebkitPrefs() { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 } | 222 } |
| 223 | 223 |
| 224 void TestWebContents::ShowCreatedWidget(int route_id, | 224 void TestWebContents::ShowCreatedWidget(int route_id, |
| 225 const gfx::Rect& initial_pos) { | 225 const gfx::Rect& initial_pos) { |
| 226 } | 226 } |
| 227 | 227 |
| 228 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 228 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace content | 231 } // namespace content |
| OLD | NEW |