Chromium Code Reviews| 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: |