OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tab_contents/test_tab_contents.h" | 5 #include "content/browser/tab_contents/test_tab_contents.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/browser_url_handler.h" | 9 #include "content/browser/browser_url_handler.h" |
10 #include "content/browser/renderer_host/mock_render_process_host.h" | 10 #include "content/browser/renderer_host/mock_render_process_host.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 params.security_info = std::string(); | 66 params.security_info = std::string(); |
67 params.gesture = NavigationGestureUser; | 67 params.gesture = NavigationGestureUser; |
68 params.was_within_same_page = false; | 68 params.was_within_same_page = false; |
69 params.is_post = false; | 69 params.is_post = false; |
70 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url)); | 70 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url)); |
71 | 71 |
72 DidNavigate(render_view_host, params); | 72 DidNavigate(render_view_host, params); |
73 } | 73 } |
74 | 74 |
75 bool TestTabContents::CreateRenderViewForRenderManager( | 75 bool TestTabContents::CreateRenderViewForRenderManager( |
76 RenderViewHost* render_view_host) { | 76 RenderViewHost* render_view_host, int opener_route_id) { |
77 // This will go to a TestRenderViewHost. | 77 // This will go to a TestRenderViewHost. |
78 render_view_host->CreateRenderView(string16(), -1); | 78 render_view_host->CreateRenderView(string16(), opener_route_id, -1); |
79 return true; | 79 return true; |
80 } | 80 } |
81 | 81 |
82 TabContents* TestTabContents::Clone() { | 82 TabContents* TestTabContents::Clone() { |
83 TabContents* tc = new TestTabContents( | 83 TabContents* tc = new TestTabContents( |
84 browser_context(), SiteInstance::CreateSiteInstance(browser_context())); | 84 browser_context(), SiteInstance::CreateSiteInstance(browser_context())); |
85 tc->controller().CopyStateFrom(controller_); | 85 tc->controller().CopyStateFrom(controller_); |
86 return tc; | 86 return tc; |
87 } | 87 } |
88 | 88 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 void TestTabContents::SetHistoryLengthAndPrune( | 151 void TestTabContents::SetHistoryLengthAndPrune( |
152 const SiteInstance* site_instance, int history_length, int32 min_page_id) { | 152 const SiteInstance* site_instance, int history_length, int32 min_page_id) { |
153 EXPECT_TRUE(expect_set_history_length_and_prune_); | 153 EXPECT_TRUE(expect_set_history_length_and_prune_); |
154 expect_set_history_length_and_prune_ = false; | 154 expect_set_history_length_and_prune_ = false; |
155 EXPECT_EQ(expect_set_history_length_and_prune_site_instance_, site_instance); | 155 EXPECT_EQ(expect_set_history_length_and_prune_site_instance_, site_instance); |
156 EXPECT_EQ(expect_set_history_length_and_prune_history_length_, | 156 EXPECT_EQ(expect_set_history_length_and_prune_history_length_, |
157 history_length); | 157 history_length); |
158 EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id); | 158 EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id); |
159 } | 159 } |
OLD | NEW |