Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 1121083004: Revert of Classify navigations without page id in parallel to the existing classifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "chrome/browser/profiles/profile_destroyer.h" 8 #include "chrome/browser/profiles/profile_destroyer.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (pending_rfh) 158 if (pending_rfh)
159 RenderFrameHostTester::For(old_rfh)->SimulateSwapOutACK(); 159 RenderFrameHostTester::For(old_rfh)->SimulateSwapOutACK();
160 160
161 // For new navigations, we need to send a larger page ID. For renavigations, 161 // For new navigations, we need to send a larger page ID. For renavigations,
162 // we need to send the preexisting page ID. We can tell these apart because 162 // we need to send the preexisting page ID. We can tell these apart because
163 // renavigations will have a pending_entry_index while new ones won't (they'll 163 // renavigations will have a pending_entry_index while new ones won't (they'll
164 // just have a standalong pending_entry that isn't in the list already). 164 // just have a standalong pending_entry that isn't in the list already).
165 if (controller->GetPendingEntryIndex() >= 0) { 165 if (controller->GetPendingEntryIndex() >= 0) {
166 test_rfh_tester->SendNavigateWithTransition( 166 test_rfh_tester->SendNavigateWithTransition(
167 controller->GetPendingEntry()->GetPageID(), 167 controller->GetPendingEntry()->GetPageID(),
168 controller->GetPendingEntry()->GetUniqueID(),
169 false,
170 controller->GetPendingEntry()->GetURL(), 168 controller->GetPendingEntry()->GetURL(),
171 controller->GetPendingEntry()->GetTransitionType()); 169 controller->GetPendingEntry()->GetTransitionType());
172 } else { 170 } else {
173 test_rfh_tester->SendNavigateWithTransition( 171 test_rfh_tester->SendNavigateWithTransition(
174 controller->GetWebContents()->GetMaxPageIDForSiteInstance( 172 controller->GetWebContents()->GetMaxPageIDForSiteInstance(
175 test_rfh->GetSiteInstance()) + 1, 173 test_rfh->GetSiteInstance()) + 1,
176 controller->GetPendingEntry()->GetUniqueID(),
177 true,
178 controller->GetPendingEntry()->GetURL(), 174 controller->GetPendingEntry()->GetURL(),
179 controller->GetPendingEntry()->GetTransitionType()); 175 controller->GetPendingEntry()->GetTransitionType());
180 } 176 }
181 } 177 }
182 178
183 void BrowserWithTestWindowTest::NavigateAndCommit( 179 void BrowserWithTestWindowTest::NavigateAndCommit(
184 NavigationController* controller, 180 NavigationController* controller,
185 const GURL& url) { 181 const GURL& url) {
186 controller->LoadURL( 182 controller->LoadURL(
187 url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); 183 url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 251
256 #if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS) 252 #if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS)
257 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() { 253 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() {
258 #if defined(USE_ASH) 254 #if defined(USE_ASH)
259 return new ash::test::AshTestViewsDelegate; 255 return new ash::test::AshTestViewsDelegate;
260 #else 256 #else
261 return new views::TestViewsDelegate; 257 return new views::TestViewsDelegate;
262 #endif 258 #endif
263 } 259 }
264 #endif 260 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698