| Index: chrome/browser/ui/login/login_prompt_browsertest.cc
|
| ===================================================================
|
| --- chrome/browser/ui/login/login_prompt_browsertest.cc (revision 145001)
|
| +++ chrome/browser/ui/login/login_prompt_browsertest.cc (working copy)
|
| @@ -10,6 +10,7 @@
|
| #include "chrome/browser/prerender/prerender_manager.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_commands.h"
|
| +#include "chrome/browser/ui/browser_tabstrip.h"
|
| #include "chrome/browser/ui/login/login_prompt.h"
|
| #include "chrome/browser/ui/tab_contents/tab_contents.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| @@ -254,7 +255,7 @@
|
| prerender::PrerenderManager::PrerenderManagerMode old_mode_;
|
| } set_prefetch_for_test(true);
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
|
|
| @@ -275,7 +276,7 @@
|
| ASSERT_TRUE(test_server()->Start());
|
| GURL test_page = test_server()->GetURL(kAuthBasicPage);
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
|
|
| @@ -322,7 +323,7 @@
|
| ASSERT_TRUE(test_server()->Start());
|
| GURL test_page = test_server()->GetURL(kAuthDigestPage);
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
|
|
| @@ -369,7 +370,7 @@
|
| IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestTwoAuths) {
|
| ASSERT_TRUE(test_server()->Start());
|
|
|
| - content::WebContents* contents1 = browser()->GetActiveWebContents();
|
| + content::WebContents* contents1 = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller1 = &contents1->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
|
|
| @@ -382,7 +383,7 @@
|
| NEW_FOREGROUND_TAB,
|
| ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);
|
|
|
| - content::WebContents* contents2 = browser()->GetActiveWebContents();
|
| + content::WebContents* contents2 = chrome::GetActiveWebContents(browser());
|
| ASSERT_NE(contents1, contents2);
|
| NavigationController* controller2 = &contents2->GetController();
|
| observer.Register(content::Source<NavigationController>(controller2));
|
| @@ -430,7 +431,7 @@
|
| GURL no_auth_page_2 = test_server()->GetURL("b");
|
| GURL no_auth_page_3 = test_server()->GetURL("c");
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
|
|
| LoginPromptBrowserTestObserver observer;
|
| @@ -526,7 +527,7 @@
|
| ASSERT_TRUE(test_server()->Start());
|
| GURL test_page = test_server()->GetURL(kMultiRealmTestPage);
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
|
|
| @@ -576,7 +577,7 @@
|
| ASSERT_TRUE(test_server()->Start());
|
| GURL test_page = test_server()->GetURL(kMultiRealmTestPage);
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
|
|
| @@ -626,7 +627,7 @@
|
| ASSERT_TRUE(test_server()->Start());
|
| GURL test_page = test_server()->GetURL(kSingleRealmTestPage);
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
|
|
| @@ -695,7 +696,7 @@
|
|
|
| ASSERT_TRUE(test_server()->Start());
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
|
|
| @@ -750,7 +751,7 @@
|
| host_resolver()->AddRule("www.b.com", "127.0.0.1");
|
| ASSERT_TRUE(test_server()->Start());
|
|
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
| LoginPromptBrowserTestObserver observer;
|
| observer.Register(content::Source<NavigationController>(controller));
|
| @@ -815,7 +816,7 @@
|
| ASSERT_TRUE(test_server()->Start());
|
|
|
| // Get NavigationController for tab 1.
|
| - content::WebContents* contents_1 = browser()->GetActiveWebContents();
|
| + content::WebContents* contents_1 = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller_1 = &contents_1->GetController();
|
|
|
| // Open a new tab.
|
| @@ -826,7 +827,7 @@
|
| ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);
|
|
|
| // Get NavigationController for tab 2.
|
| - content::WebContents* contents_2 = browser()->GetActiveWebContents();
|
| + content::WebContents* contents_2 = chrome::GetActiveWebContents(browser());
|
| ASSERT_NE(contents_1, contents_2);
|
| NavigationController* controller_2 = &contents_2->GetController();
|
|
|
| @@ -877,7 +878,7 @@
|
| ASSERT_TRUE(test_server()->Start());
|
|
|
| // Get NavigationController for tab 1.
|
| - content::WebContents* contents_1 = browser()->GetActiveWebContents();
|
| + content::WebContents* contents_1 = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller_1 = &contents_1->GetController();
|
|
|
| // Open a new tab.
|
| @@ -888,7 +889,7 @@
|
| ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);
|
|
|
| // Get NavigationController for tab 2.
|
| - content::WebContents* contents_2 = browser()->GetActiveWebContents();
|
| + content::WebContents* contents_2 = chrome::GetActiveWebContents(browser());
|
| ASSERT_NE(contents_1, contents_2);
|
| NavigationController* controller_2 = &contents_2->GetController();
|
|
|
| @@ -940,7 +941,7 @@
|
| ASSERT_TRUE(test_server()->Start());
|
|
|
| // Get NavigationController for regular tab.
|
| - content::WebContents* contents = browser()->GetActiveWebContents();
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser());
|
| NavigationController* controller = &contents->GetController();
|
|
|
| // Open an incognito window.
|
| @@ -948,7 +949,7 @@
|
|
|
| // Get NavigationController for incognito tab.
|
| content::WebContents* contents_incognito =
|
| - browser_incognito->GetActiveWebContents();
|
| + chrome::GetActiveWebContents(browser_incognito);
|
| ASSERT_NE(contents, contents_incognito);
|
| NavigationController* controller_incognito =
|
| &contents_incognito->GetController();
|
|
|