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

Unified Diff: components/printing/test/print_web_view_helper_browsertest.cc

Issue 2907663004: FrameTree::Find only searches relative to local frames. (Closed)
Patch Set: . Created 3 years, 7 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: components/printing/test/print_web_view_helper_browsertest.cc
diff --git a/components/printing/test/print_web_view_helper_browsertest.cc b/components/printing/test/print_web_view_helper_browsertest.cc
index 0cd8115925d9340af1099f7d11340df55b785ff0..3c708f782108dc32617401b50847f0e8b7218437 100644
--- a/components/printing/test/print_web_view_helper_browsertest.cc
+++ b/components/printing/test/print_web_view_helper_browsertest.cc
@@ -413,7 +413,9 @@ TEST_F(MAYBE_PrintWebViewHelperTest, PrintWithIframe) {
// Find the frame and set it as the focused one. This should mean that that
// the printout should only contain the contents of that frame.
auto* web_view = view_->GetWebView();
- WebFrame* sub1_frame = web_view->FindFrameByName(WebString::FromUTF8("sub1"));
+ WebFrame* sub1_frame =
+ web_view->MainFrame()->ToWebLocalFrame()->FindFrameByName(
+ WebString::FromUTF8("sub1"));
Łukasz Anforowicz 2017/05/26 16:38:40 ToWebLocalFrame() above is okay, because otherwise
ASSERT_TRUE(sub1_frame);
web_view->SetFocusedFrame(sub1_frame);
ASSERT_NE(web_view->FocusedFrame(), web_view->MainFrame());

Powered by Google App Engine
This is Rietveld 408576698