| Index: chrome/browser/ui/browser_browsertest.cc
|
| diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
|
| index 7f6fa033d5c58ddc9102abb1a97b718c9ba352ba..3974f164cb6ffc6d271fcafac8a25f501b1e102e 100644
|
| --- a/chrome/browser/ui/browser_browsertest.cc
|
| +++ b/chrome/browser/ui/browser_browsertest.cc
|
| @@ -2389,11 +2389,11 @@ class ClickModifierTest : public InProcessBrowserTest {
|
| base::FilePath(FILE_PATH_LITERAL("href.html")));
|
| }
|
|
|
| - base::string16 getFirstPageTitle() {
|
| + base::string16 GetFirstPageTitle() {
|
| return ASCIIToUTF16(kFirstPageTitle);
|
| }
|
|
|
| - base::string16 getSecondPageTitle() {
|
| + base::string16 GetSecondPageTitle() {
|
| return ASCIIToUTF16(kSecondPageTitle);
|
| }
|
|
|
| @@ -2421,15 +2421,14 @@ class ClickModifierTest : public InProcessBrowserTest {
|
| same_tab_observer.Wait();
|
| EXPECT_EQ(1u, chrome::GetBrowserCount(browser->profile()));
|
| EXPECT_EQ(1, browser->tab_strip_model()->count());
|
| - EXPECT_EQ(getSecondPageTitle(), web_contents->GetTitle());
|
| + EXPECT_EQ(GetSecondPageTitle(), web_contents->GetTitle());
|
| return;
|
| }
|
|
|
| - content::WindowedNotificationObserver observer(
|
| - chrome::NOTIFICATION_TAB_ADDED,
|
| - content::NotificationService::AllSources());
|
| + content::TestNavigationObserver new_tab_observer(nullptr);
|
| + new_tab_observer.StartWatchingNewWebContents();
|
| SimulateMouseClick(web_contents, modifiers, button);
|
| - observer.Wait();
|
| + new_tab_observer.Wait();
|
|
|
| if (disposition == WindowOpenDisposition::NEW_WINDOW) {
|
| EXPECT_EQ(2u, chrome::GetBrowserCount(browser->profile()));
|
| @@ -2439,12 +2438,11 @@ class ClickModifierTest : public InProcessBrowserTest {
|
| EXPECT_EQ(1u, chrome::GetBrowserCount(browser->profile()));
|
| EXPECT_EQ(2, browser->tab_strip_model()->count());
|
| web_contents = browser->tab_strip_model()->GetActiveWebContents();
|
| - WaitForLoadStop(web_contents);
|
| if (disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB) {
|
| - EXPECT_EQ(getSecondPageTitle(), web_contents->GetTitle());
|
| + EXPECT_EQ(GetSecondPageTitle(), web_contents->GetTitle());
|
| } else {
|
| ASSERT_EQ(WindowOpenDisposition::NEW_BACKGROUND_TAB, disposition);
|
| - EXPECT_EQ(getFirstPageTitle(), web_contents->GetTitle());
|
| + EXPECT_EQ(GetFirstPageTitle(), web_contents->GetTitle());
|
| }
|
| }
|
|
|
|
|