summaryrefslogtreecommitdiffstats
path: root/chrome/browser/find_bar_host_browsertest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/find_bar_host_browsertest.cc')
-rw-r--r--chrome/browser/find_bar_host_browsertest.cc23
1 files changed, 18 insertions, 5 deletions
diff --git a/chrome/browser/find_bar_host_browsertest.cc b/chrome/browser/find_bar_host_browsertest.cc
index 5d67553..02d51f7 100644
--- a/chrome/browser/find_bar_host_browsertest.cc
+++ b/chrome/browser/find_bar_host_browsertest.cc
@@ -835,8 +835,11 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PreferPreviousSearch) {
EXPECT_EQ(1, FindInPageWchar(tab1, L"Default", kFwd, kIgnoreCase, &ordinal));
// Create a second tab.
+ Browser* browser_used = NULL;
browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, -1,
- TabStripModel::ADD_SELECTED, NULL, std::string());
+ TabStripModel::ADD_SELECTED, NULL, std::string(),
+ &browser_used);
+ EXPECT_EQ(browser(), browser_used);
browser()->SelectTabContentsAt(1, false);
TabContents* tab2 = browser()->GetSelectedTabContents();
EXPECT_NE(tab1, tab2);
@@ -912,8 +915,11 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PrepopulateInNewTab) {
EXPECT_EQ(1, FindInPageWchar(tab1, L"page", kFwd, kIgnoreCase, &ordinal));
// Now create a second tab and load the same page.
+ Browser* browser_used = NULL;
browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, -1,
- TabStripModel::ADD_SELECTED, NULL, std::string());
+ TabStripModel::ADD_SELECTED, NULL, std::string(),
+ &browser_used);
+ EXPECT_EQ(browser(), browser_used);
browser()->SelectTabContentsAt(1, false);
TabContents* tab2 = browser()->GetSelectedTabContents();
EXPECT_NE(tab1, tab2);
@@ -957,8 +963,11 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PrepopulatePreserveLast) {
FindBarController::kKeepSelection);
// Now create a second tab and load the same page.
+ Browser* browser_used = NULL;
browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, -1,
- TabStripModel::ADD_SELECTED, NULL, std::string());
+ TabStripModel::ADD_SELECTED, NULL, std::string(),
+ &browser_used);
+ EXPECT_EQ(browser(), browser_used);
browser()->SelectTabContentsAt(1, false);
TabContents* tab2 = browser()->GetSelectedTabContents();
EXPECT_NE(tab1, tab2);
@@ -1034,9 +1043,11 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) {
// Open a new incognito window and navigate to the same page.
Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile();
Browser* incognito_browser = Browser::Create(incognito_profile);
+ Browser* browser_used = NULL;
incognito_browser->AddTabWithURL(url, GURL(), PageTransition::START_PAGE, -1,
TabStripModel::ADD_SELECTED, NULL,
- std::string());
+ std::string(), &browser_used);
+ EXPECT_EQ(incognito_browser, browser_used);
ui_test_utils::WaitForNavigation(
&incognito_browser->GetSelectedTabContents()->controller());
incognito_browser->window()->Show();
@@ -1057,7 +1068,9 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) {
// Now open a new tab in the original (non-incognito) browser.
browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, -1,
- TabStripModel::ADD_SELECTED, NULL, std::string());
+ TabStripModel::ADD_SELECTED, NULL, std::string(),
+ &browser_used);
+ EXPECT_EQ(browser(), browser_used);
browser()->SelectTabContentsAt(1, false);
TabContents* tab2 = browser()->GetSelectedTabContents();
EXPECT_NE(tab1, tab2);