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

Unified Diff: chrome/browser/media/tab_desktop_media_list_unittest.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/browser/media/tab_desktop_media_list_unittest.cc
diff --git a/chrome/browser/media/tab_desktop_media_list_unittest.cc b/chrome/browser/media/tab_desktop_media_list_unittest.cc
index f1117f0238999bf972c61219a669c45fb49df7f5..80c7a50f39d8b9114b1e8b49c5ca7b69c514a3b0 100644
--- a/chrome/browser/media/tab_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/tab_desktop_media_list_unittest.cc
@@ -139,7 +139,7 @@ class TabDesktopMediaListTest : public testing::Test {
entry = contents->GetController().GetTransientEntry();
}
- entry->SetTitle(base::UTF8ToUTF16("Test tab"));
+ contents->UpdateTitleForEntry(entry, base::ASCIIToUTF16("Test tab"));
content::FaviconStatus favicon_info;
favicon_info.image =
@@ -325,8 +325,9 @@ TEST_F(TabDesktopMediaListTest, UpdateTitle) {
WebContents* contents =
tab_strip_model->GetWebContentsAt(kDefaultSourceCount - 1);
ASSERT_TRUE(contents);
- contents->GetController().GetTransientEntry()->SetTitle(
- base::UTF8ToUTF16("New test tab"));
+ const content::NavigationController& controller = contents->GetController();
+ contents->UpdateTitleForEntry(controller.GetTransientEntry(),
+ base::ASCIIToUTF16("New test tab"));
EXPECT_CALL(observer_, OnSourceNameChanged(list_.get(), 0))
.WillOnce(QuitMessageLoop());

Powered by Google App Engine
This is Rietveld 408576698