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 "chrome/test/base/browser_with_test_window_test.h" | 5 #include "chrome/test/base/browser_with_test_window_test.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <ole2.h> | 8 #include <ole2.h> |
9 #endif // defined(OS_WIN) | 9 #endif // defined(OS_WIN) |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // renavigations will have a pending_entry_index while new ones won't (they'll | 116 // renavigations will have a pending_entry_index while new ones won't (they'll |
117 // just have a standalong pending_entry that isn't in the list already). | 117 // just have a standalong pending_entry that isn't in the list already). |
118 if (controller->GetPendingEntryIndex() >= 0) { | 118 if (controller->GetPendingEntryIndex() >= 0) { |
119 test_rvh->SendNavigateWithTransition( | 119 test_rvh->SendNavigateWithTransition( |
120 controller->GetPendingEntry()->GetPageID(), | 120 controller->GetPendingEntry()->GetPageID(), |
121 controller->GetPendingEntry()->GetURL(), | 121 controller->GetPendingEntry()->GetURL(), |
122 controller->GetPendingEntry()->GetTransitionType()); | 122 controller->GetPendingEntry()->GetTransitionType()); |
123 } else { | 123 } else { |
124 test_rvh->SendNavigateWithTransition( | 124 test_rvh->SendNavigateWithTransition( |
125 controller->GetWebContents()-> | 125 controller->GetWebContents()-> |
126 GetMaxPageIDForSiteInstance(test_rvh->site_instance()) + 1, | 126 GetMaxPageIDForSiteInstance(test_rvh->GetSiteInstance()) + 1, |
127 controller->GetPendingEntry()->GetURL(), | 127 controller->GetPendingEntry()->GetURL(), |
128 controller->GetPendingEntry()->GetTransitionType()); | 128 controller->GetPendingEntry()->GetTransitionType()); |
129 } | 129 } |
130 | 130 |
131 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation | 131 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation |
132 // without making any network requests. | 132 // without making any network requests. |
133 if (pending_rvh) | 133 if (pending_rvh) |
134 old_rvh->OnSwapOutACK(); | 134 old_rvh->OnSwapOutACK(); |
135 } | 135 } |
136 | 136 |
(...skipping 16 matching lines...) Expand all Loading... |
153 // Make sure we close all tabs, otherwise Browser isn't happy in its | 153 // Make sure we close all tabs, otherwise Browser isn't happy in its |
154 // destructor. | 154 // destructor. |
155 browser()->CloseAllTabs(); | 155 browser()->CloseAllTabs(); |
156 browser_.reset(NULL); | 156 browser_.reset(NULL); |
157 window_.reset(NULL); | 157 window_.reset(NULL); |
158 } | 158 } |
159 | 159 |
160 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { | 160 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { |
161 return new TestingProfile(); | 161 return new TestingProfile(); |
162 } | 162 } |
OLD | NEW |