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

Unified Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improving comment and removing the NOTREACHED. Created 4 years, 5 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
Index: chrome/test/base/browser_with_test_window_test.cc
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index b2dda01e98cfe9b81ef29c516fd7b2d7ff3ae389..cfb71ad971982b7917b97a9c44c26ce5160ff5e1 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -183,10 +183,11 @@ void BrowserWithTestWindowTest::NavigateAndCommitActiveTabWithTitle(
Browser* navigating_browser,
const GURL& url,
const base::string16& title) {
- NavigationController* controller = &navigating_browser->tab_strip_model()->
- GetActiveWebContents()->GetController();
+ WebContents* contents =
+ navigating_browser->tab_strip_model()->GetActiveWebContents();
+ NavigationController* controller = &contents->GetController();
NavigateAndCommit(controller, url);
- controller->GetActiveEntry()->SetTitle(title);
+ contents->UpdateTitleForEntry(controller->GetActiveEntry(), title);
}
void BrowserWithTestWindowTest::DestroyBrowserAndProfile() {

Powered by Google App Engine
This is Rietveld 408576698