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

Unified Diff: chrome/test/base/ui_test_utils.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/tracing_browsertest.cc ('k') | chrome/test/base/web_ui_browser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/ui_test_utils.cc
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index b3f7143f9b7b0b5617207afad818d49cd7af1a81..2be097e157f429176bd7545a336e904405f38d6b 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -166,7 +166,7 @@ void NavigateToURLWithPost(Browser* browser, const GURL& url) {
}
void NavigateToURL(Browser* browser, const GURL& url) {
- NavigateToURLWithDisposition(browser, url, CURRENT_TAB,
+ NavigateToURLWithDisposition(browser, url, WindowOpenDisposition::CURRENT_TAB,
BROWSER_TEST_WAIT_FOR_NAVIGATION);
}
@@ -177,8 +177,9 @@ void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
WindowOpenDisposition disposition,
int browser_test_flags) {
TabStripModel* tab_strip = browser->tab_strip_model();
- if (disposition == CURRENT_TAB && tab_strip->GetActiveWebContents())
- content::WaitForLoadStop(tab_strip->GetActiveWebContents());
+ if (disposition == WindowOpenDisposition::CURRENT_TAB &&
+ tab_strip->GetActiveWebContents())
+ content::WaitForLoadStop(tab_strip->GetActiveWebContents());
content::TestNavigationObserver same_tab_observer(
tab_strip->GetActiveWebContents(),
number_of_navigations);
@@ -202,7 +203,7 @@ void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
return;
}
WebContents* web_contents = NULL;
- if (disposition == NEW_BACKGROUND_TAB) {
+ if (disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB) {
// We've opened up a new tab, but not selected it.
TabStripModel* tab_strip = browser->tab_strip_model();
web_contents = tab_strip->GetWebContentsAt(tab_strip->active_index() + 1);
@@ -211,13 +212,13 @@ void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
<< "\" because the new tab is not available yet";
if (!web_contents)
return;
- } else if ((disposition == CURRENT_TAB) ||
- (disposition == NEW_FOREGROUND_TAB) ||
- (disposition == SINGLETON_TAB)) {
+ } else if ((disposition == WindowOpenDisposition::CURRENT_TAB) ||
+ (disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB) ||
+ (disposition == WindowOpenDisposition::SINGLETON_TAB)) {
// The currently selected tab is the right one.
web_contents = browser->tab_strip_model()->GetActiveWebContents();
}
- if (disposition == CURRENT_TAB) {
+ if (disposition == WindowOpenDisposition::CURRENT_TAB) {
same_tab_observer.Wait();
return;
} else if (web_contents) {
@@ -247,10 +248,7 @@ void NavigateToURLBlockUntilNavigationsComplete(Browser* browser,
const GURL& url,
int number_of_navigations) {
NavigateToURLWithDispositionBlockUntilNavigationsComplete(
- browser,
- url,
- number_of_navigations,
- CURRENT_TAB,
+ browser, url, number_of_navigations, WindowOpenDisposition::CURRENT_TAB,
BROWSER_TEST_WAIT_FOR_NAVIGATION);
}
« no previous file with comments | « chrome/test/base/tracing_browsertest.cc ('k') | chrome/test/base/web_ui_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698