| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/frame_host/interstitial_page_impl.h" | 5 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 6 | 6 |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 GURL url("http://interstitial"); | 142 GURL url("http://interstitial"); |
| 143 interstitial_.reset(new InterstitialPageImpl( | 143 interstitial_.reset(new InterstitialPageImpl( |
| 144 web_contents, static_cast<RenderWidgetHostDelegate*>(web_contents), | 144 web_contents, static_cast<RenderWidgetHostDelegate*>(web_contents), |
| 145 true, url, interstitial_delegate)); | 145 true, url, interstitial_delegate)); |
| 146 interstitial_->Show(); | 146 interstitial_->Show(); |
| 147 WaitForInterstitialAttach(web_contents); | 147 WaitForInterstitialAttach(web_contents); |
| 148 | 148 |
| 149 // Focus the interstitial frame | 149 // Focus the interstitial frame |
| 150 FrameTree* frame_tree = static_cast<RenderViewHostDelegate*>( | 150 FrameTree* frame_tree = static_cast<RenderViewHostDelegate*>( |
| 151 interstitial_.get())->GetFrameTree(); | 151 interstitial_.get())->GetFrameTree(); |
| 152 frame_tree->SetFocusedFrame(frame_tree->root(), | 152 static_cast<RenderFrameHostDelegate*>(interstitial_.get()) |
| 153 frame_tree->GetMainFrame()->GetSiteInstance()); | 153 ->SetFocusedFrame(frame_tree->root(), |
| 154 frame_tree->GetMainFrame()->GetSiteInstance()); |
| 154 | 155 |
| 155 clipboard_message_watcher_ = | 156 clipboard_message_watcher_ = |
| 156 new ClipboardMessageWatcher(interstitial_.get()); | 157 new ClipboardMessageWatcher(interstitial_.get()); |
| 157 | 158 |
| 158 // Wait until page loads completely. | 159 // Wait until page loads completely. |
| 159 ASSERT_TRUE(WaitForRenderFrameReady(interstitial_->GetMainFrame())); | 160 ASSERT_TRUE(WaitForRenderFrameReady(interstitial_->GetMainFrame())); |
| 160 } | 161 } |
| 161 | 162 |
| 162 void TearDownInterstitialPage() { | 163 void TearDownInterstitialPage() { |
| 163 // Close the interstitial. | 164 // Close the interstitial. |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 307 |
| 307 PerformSelectAll(); | 308 PerformSelectAll(); |
| 308 | 309 |
| 309 ASSERT_TRUE(GetSelection(&input_text)); | 310 ASSERT_TRUE(GetSelection(&input_text)); |
| 310 EXPECT_EQ("original body text", input_text); | 311 EXPECT_EQ("original body text", input_text); |
| 311 | 312 |
| 312 TearDownInterstitialPage(); | 313 TearDownInterstitialPage(); |
| 313 } | 314 } |
| 314 | 315 |
| 315 } // namespace content | 316 } // namespace content |
| OLD | NEW |