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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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/in_process_browser_test.h" 5 #include "chrome/test/base/in_process_browser_test.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 // navigation to tests, which should make sure navigations succeed when 380 // navigation to tests, which should make sure navigations succeed when
381 // appropriate. See https://crbug.com/425335 381 // appropriate. See https://crbug.com/425335
382 void InProcessBrowserTest::AddTabAtIndexToBrowser( 382 void InProcessBrowserTest::AddTabAtIndexToBrowser(
383 Browser* browser, 383 Browser* browser,
384 int index, 384 int index,
385 const GURL& url, 385 const GURL& url,
386 ui::PageTransition transition, 386 ui::PageTransition transition,
387 bool check_navigation_success) { 387 bool check_navigation_success) {
388 chrome::NavigateParams params(browser, url, transition); 388 chrome::NavigateParams params(browser, url, transition);
389 params.tabstrip_index = index; 389 params.tabstrip_index = index;
390 params.disposition = NEW_FOREGROUND_TAB; 390 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
391 chrome::Navigate(&params); 391 chrome::Navigate(&params);
392 392
393 if (check_navigation_success) 393 if (check_navigation_success)
394 content::WaitForLoadStop(params.target_contents); 394 content::WaitForLoadStop(params.target_contents);
395 else 395 else
396 content::WaitForLoadStopWithoutSuccessCheck(params.target_contents); 396 content::WaitForLoadStopWithoutSuccessCheck(params.target_contents);
397 } 397 }
398 398
399 void InProcessBrowserTest::AddTabAtIndex( 399 void InProcessBrowserTest::AddTabAtIndex(
400 int index, 400 int index,
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // On the Mac, this eventually reaches 598 // On the Mac, this eventually reaches
599 // -[BrowserWindowController windowWillClose:], which will post a deferred 599 // -[BrowserWindowController windowWillClose:], which will post a deferred
600 // -autorelease on itself to ultimately destroy the Browser object. The line 600 // -autorelease on itself to ultimately destroy the Browser object. The line
601 // below is necessary to pump these pending messages to ensure all Browsers 601 // below is necessary to pump these pending messages to ensure all Browsers
602 // get deleted. 602 // get deleted.
603 content::RunAllPendingInMessageLoop(); 603 content::RunAllPendingInMessageLoop();
604 delete autorelease_pool_; 604 delete autorelease_pool_;
605 autorelease_pool_ = NULL; 605 autorelease_pool_ = NULL;
606 #endif 606 #endif
607 } 607 }
OLDNEW
« no previous file with comments | « chrome/test/base/browser_with_test_window_test.cc ('k') | chrome/test/base/test_browser_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698