| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // renavigations will have a pending_entry_index while new ones won't (they'll | 110 // renavigations will have a pending_entry_index while new ones won't (they'll |
| 111 // just have a standalong pending_entry that isn't in the list already). | 111 // just have a standalong pending_entry that isn't in the list already). |
| 112 if (controller->GetPendingEntryIndex() >= 0) { | 112 if (controller->GetPendingEntryIndex() >= 0) { |
| 113 test_rvh->SendNavigateWithTransition( | 113 test_rvh->SendNavigateWithTransition( |
| 114 controller->GetPendingEntry()->GetPageID(), | 114 controller->GetPendingEntry()->GetPageID(), |
| 115 controller->GetPendingEntry()->GetURL(), | 115 controller->GetPendingEntry()->GetURL(), |
| 116 controller->GetPendingEntry()->GetTransitionType()); | 116 controller->GetPendingEntry()->GetTransitionType()); |
| 117 } else { | 117 } else { |
| 118 test_rvh->SendNavigateWithTransition( | 118 test_rvh->SendNavigateWithTransition( |
| 119 controller->GetWebContents()-> | 119 controller->GetWebContents()-> |
| 120 GetMaxPageIDForSiteInstance(test_rvh->site_instance()) + 1, | 120 GetMaxPageIDForSiteInstance(test_rvh->GetSiteInstance()) + 1, |
| 121 controller->GetPendingEntry()->GetURL(), | 121 controller->GetPendingEntry()->GetURL(), |
| 122 controller->GetPendingEntry()->GetTransitionType()); | 122 controller->GetPendingEntry()->GetTransitionType()); |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation | 125 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation |
| 126 // without making any network requests. | 126 // without making any network requests. |
| 127 if (pending_rvh) | 127 if (pending_rvh) |
| 128 old_rvh->OnSwapOutACK(); | 128 old_rvh->OnSwapOutACK(); |
| 129 } | 129 } |
| 130 | 130 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 147 // Make sure we close all tabs, otherwise Browser isn't happy in its | 147 // Make sure we close all tabs, otherwise Browser isn't happy in its |
| 148 // destructor. | 148 // destructor. |
| 149 browser()->CloseAllTabs(); | 149 browser()->CloseAllTabs(); |
| 150 browser_.reset(NULL); | 150 browser_.reset(NULL); |
| 151 window_.reset(NULL); | 151 window_.reset(NULL); |
| 152 } | 152 } |
| 153 | 153 |
| 154 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { | 154 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { |
| 155 return new TestingProfile(); | 155 return new TestingProfile(); |
| 156 } | 156 } |
| OLD | NEW |