Index: chrome/browser/history/redirect_browsertest.cc |
=================================================================== |
--- chrome/browser/history/redirect_browsertest.cc (revision 145001) |
+++ chrome/browser/history/redirect_browsertest.cc (working copy) |
@@ -21,6 +21,7 @@ |
#include "chrome/browser/history/history_service_factory.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/browser.h" |
+#include "chrome/browser/ui/browser_tabstrip.h" |
#include "chrome/browser/ui/view_ids.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/ui_test_utils.h" |
@@ -100,14 +101,14 @@ |
EXPECT_EQ(final_url.spec(), redirects[0].spec()); |
// The address bar should display the final URL. |
- EXPECT_EQ(final_url, browser()->GetActiveWebContents()->GetURL()); |
+ EXPECT_EQ(final_url, chrome::GetActiveWebContents(browser())->GetURL()); |
// Navigate one more time. |
ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( |
browser(), first_url, 2); |
// The address bar should still display the final URL. |
- EXPECT_EQ(final_url, browser()->GetActiveWebContents()->GetURL()); |
+ EXPECT_EQ(final_url, chrome::GetActiveWebContents(browser())->GetURL()); |
} |
// http://code.google.com/p/chromium/issues/detail?id=62772 |
@@ -154,7 +155,7 @@ |
FilePath(), FilePath().AppendASCII("cancelled_redirect_test.html")); |
ui_test_utils::NavigateToURL(browser(), first_url); |
- content::WebContents* web_contents = browser()->GetActiveWebContents(); |
+ content::WebContents* web_contents = chrome::GetActiveWebContents(browser()); |
content::TestNavigationObserver navigation_observer( |
content::Source<content::NavigationController>( |
&web_contents->GetController())); |
@@ -209,7 +210,7 @@ |
ui_test_utils::NavigateToURL(browser(), initial_url); |
- EXPECT_EQ(ref, browser()->GetActiveWebContents()->GetURL().ref()); |
+ EXPECT_EQ(ref, chrome::GetActiveWebContents(browser())->GetURL().ref()); |
} |
// Test that redirect from http:// to file:// : |
@@ -229,7 +230,7 @@ |
// We make sure the title doesn't match the title from the file, because the |
// nav should not have taken place. |
EXPECT_NE(ASCIIToUTF16("File!"), |
- browser()->GetActiveWebContents()->GetTitle()); |
+ chrome::GetActiveWebContents(browser())->GetTitle()); |
} |
// Ensures that non-user initiated location changes (within page) are |
@@ -267,7 +268,7 @@ |
GURL first_url = test_server()->GetURL( |
"client-redirect?" + slow.spec()); |
- content::WebContents* web_contents = browser()->GetActiveWebContents(); |
+ content::WebContents* web_contents = chrome::GetActiveWebContents(browser()); |
content::TestNavigationObserver observer( |
content::Source<content::NavigationController>( |
&web_contents->GetController()), |
@@ -286,7 +287,7 @@ |
// Check to make sure the navigation did in fact take place and we are |
// at the expected page. |
EXPECT_EQ(ASCIIToUTF16("Title Of Awesomeness"), |
- browser()->GetActiveWebContents()->GetTitle()); |
+ chrome::GetActiveWebContents(browser())->GetTitle()); |
bool final_navigation_not_redirect = true; |
std::vector<GURL> redirects = GetRedirects(first_url); |