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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "content/browser/browser_thread_impl.h" | 6 #include "content/browser/browser_thread_impl.h" |
7 #include "content/browser/renderer_host/test_render_view_host.h" | 7 #include "content/browser/renderer_host/test_render_view_host.h" |
8 #include "content/browser/site_instance_impl.h" | 8 #include "content/browser/site_instance_impl.h" |
9 #include "content/browser/web_contents/navigation_controller_impl.h" | 9 #include "content/browser/web_contents/navigation_controller_impl.h" |
10 #include "content/browser/web_contents/navigation_entry_impl.h" | 10 #include "content/browser/web_contents/navigation_entry_impl.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation | 156 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation |
157 // without making any network requests. | 157 // without making any network requests. |
158 if (old_rvh != active_rvh()) | 158 if (old_rvh != active_rvh()) |
159 old_rvh->OnSwapOutACK(false); | 159 old_rvh->OnSwapOutACK(false); |
160 } | 160 } |
161 | 161 |
162 bool ShouldSwapProcesses(RenderViewHostManager* manager, | 162 bool ShouldSwapProcesses(RenderViewHostManager* manager, |
163 const NavigationEntryImpl* cur_entry, | 163 const NavigationEntryImpl* cur_entry, |
164 const NavigationEntryImpl* new_entry) const { | 164 const NavigationEntryImpl* new_entry) const { |
165 return manager->ShouldSwapProcessesForNavigation(cur_entry, new_entry); | 165 return manager->ShouldSwapBrowsingInstanceForNavigation(cur_entry, |
| 166 new_entry); |
166 } | 167 } |
167 | 168 |
168 private: | 169 private: |
169 RenderViewHostManagerTestClient client_; | 170 RenderViewHostManagerTestClient client_; |
170 RenderViewHostManagerTestBrowserClient browser_client_; | 171 RenderViewHostManagerTestBrowserClient browser_client_; |
171 ContentClient* old_client_; | 172 ContentClient* old_client_; |
172 ContentBrowserClient* old_browser_client_; | 173 ContentBrowserClient* old_browser_client_; |
173 }; | 174 }; |
174 | 175 |
175 // Tests that when you navigate from a chrome:// url to another page, and | 176 // Tests that when you navigate from a chrome:// url to another page, and |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 | 923 |
923 // Commit. | 924 // Commit. |
924 manager.DidNavigateMainFrame(host); | 925 manager.DidNavigateMainFrame(host); |
925 EXPECT_EQ(host, manager.current_host()); | 926 EXPECT_EQ(host, manager.current_host()); |
926 ASSERT_TRUE(host); | 927 ASSERT_TRUE(host); |
927 EXPECT_EQ(static_cast<SiteInstanceImpl*>(host->GetSiteInstance()), | 928 EXPECT_EQ(static_cast<SiteInstanceImpl*>(host->GetSiteInstance()), |
928 instance); | 929 instance); |
929 } | 930 } |
930 | 931 |
931 } // namespace content | 932 } // namespace content |
OLD | NEW |