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

Unified Diff: content/browser/frame_host/interstitial_page_impl_browsertest.cc

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting the task manager changes into its own CL. 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: content/browser/frame_host/interstitial_page_impl_browsertest.cc
diff --git a/content/browser/frame_host/interstitial_page_impl_browsertest.cc b/content/browser/frame_host/interstitial_page_impl_browsertest.cc
index 2fbdda35c986c6b0713dec2372b10bcd0c633447..b64712ff9570e7ce1e3653d8e0eabf3fc29f0eba 100644
--- a/content/browser/frame_host/interstitial_page_impl_browsertest.cc
+++ b/content/browser/frame_host/interstitial_page_impl_browsertest.cc
@@ -293,11 +293,15 @@ class InterstitialPageImplTest : public ContentBrowserTest {
std::string PerformCut() {
clipboard_message_watcher_->InitWait();
title_update_watcher_->InitWait("TEXT_CHANGED");
Charlie Reis 2016/07/13 22:21:47 Is it still useful to keep the old title_update_wa
afakhry 2016/07/13 22:52:50 It's probably redundant. I also don't feel strongl
+ const base::string16 expected_title = base::UTF8ToUTF16("TEXT_CHANGED");
+ content::TitleWatcher title_watcher(shell()->web_contents(),
+ expected_title);
RenderFrameHostImpl* rfh =
static_cast<RenderFrameHostImpl*>(interstitial_->GetMainFrame());
rfh->GetRenderWidgetHost()->delegate()->Cut();
clipboard_message_watcher_->WaitForWriteCommit();
title_update_watcher_->Wait();
+ EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
return clipboard_message_watcher_->last_text();
}
@@ -312,18 +316,27 @@ class InterstitialPageImplTest : public ContentBrowserTest {
void PerformPaste() {
title_update_watcher_->InitWait("TEXT_CHANGED");
+ const base::string16 expected_title = base::UTF8ToUTF16("TEXT_CHANGED");
+ content::TitleWatcher title_watcher(shell()->web_contents(),
+ expected_title);
RenderFrameHostImpl* rfh =
static_cast<RenderFrameHostImpl*>(interstitial_->GetMainFrame());
rfh->GetRenderWidgetHost()->delegate()->Paste();
title_update_watcher_->Wait();
+ EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
}
void PerformSelectAll() {
title_update_watcher_->InitWait("SELECTION_CHANGED");
+ const base::string16 expected_title =
+ base::UTF8ToUTF16("SELECTION_CHANGED");
+ content::TitleWatcher title_watcher(shell()->web_contents(),
+ expected_title);
RenderFrameHostImpl* rfh =
static_cast<RenderFrameHostImpl*>(interstitial_->GetMainFrame());
rfh->GetRenderWidgetHost()->delegate()->SelectAll();
title_update_watcher_->Wait();
+ EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
}
private:

Powered by Google App Engine
This is Rietveld 408576698