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

Unified Diff: chrome/browser/history/redirect_browsertest.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/browser/history/multipart_browsertest.cc ('k') | chrome/browser/iframe_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/history/multipart_browsertest.cc ('k') | chrome/browser/iframe_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698