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

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: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() 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..01d7c8f23ecb4226a14e328b818ec3b973fad3a1 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::UTF8ToUTF16("Test tab"));
Lei Zhang 2016/07/13 23:17:17 ASCIIToUTF16() while we are here? Ditto on line 33
afakhry 2016/07/13 23:36:17 Done.
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"));
+ content::NavigationController* controller = &contents->GetController();
Lei Zhang 2016/07/13 23:17:17 Just use a const ref?
afakhry 2016/07/13 23:36:17 Done.
+ contents->UpdateTitleForEntry(controller->GetTransientEntry(),
+ base::UTF8ToUTF16("New test tab"));
EXPECT_CALL(observer_, OnSourceNameChanged(list_.get(), 0))
.WillOnce(QuitMessageLoop());

Powered by Google App Engine
This is Rietveld 408576698