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

Side by Side Diff: content/browser/frame_host/interstitial_page_impl_browsertest.cc

Issue 2721303003: DO NOT SUBMIT: test the test impl. shoul fail (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/browser/frame_host/interstitial_page_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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());
155
154 156
155 clipboard_message_watcher_ = 157 clipboard_message_watcher_ =
156 new ClipboardMessageWatcher(interstitial_.get()); 158 new ClipboardMessageWatcher(interstitial_.get());
157 159
158 // Wait until page loads completely. 160 // Wait until page loads completely.
159 ASSERT_TRUE(WaitForRenderFrameReady(interstitial_->GetMainFrame())); 161 ASSERT_TRUE(WaitForRenderFrameReady(interstitial_->GetMainFrame()));
160 } 162 }
161 163
162 void TearDownInterstitialPage() { 164 void TearDownInterstitialPage() {
163 // Close the interstitial. 165 // Close the interstitial.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 308
307 PerformSelectAll(); 309 PerformSelectAll();
308 310
309 ASSERT_TRUE(GetSelection(&input_text)); 311 ASSERT_TRUE(GetSelection(&input_text));
310 EXPECT_EQ("original body text", input_text); 312 EXPECT_EQ("original body text", input_text);
311 313
312 TearDownInterstitialPage(); 314 TearDownInterstitialPage();
313 } 315 }
314 316
315 } // namespace content 317 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/interstitial_page_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698