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

Unified Diff: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp

Issue 2923433002: Move ExecuteScript method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Tweaked a comment in WebViewPlugin::WebViewHelper::main_frame [as suggested in CR feedback] Created 3 years, 6 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: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
index 951583efd06ef3c821f6d2ee6cee4235879809d6..ccbba398cf8ee5ad864a6cddab2f71fac12505ae 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -1012,13 +1012,13 @@ TEST_P(VisualViewportTest,
WebRect extent_rect;
WebViewImpl()->SetPageScaleFactor(2);
- WebFrame* mainFrame = WebViewImpl()->MainFrame();
+ WebLocalFrame* mainFrame = WebViewImpl()->MainFrameImpl();
// Select some text and get the base and extent rects (that's the start of
// the range and its end). Do a sanity check that the expected text is
// selected
mainFrame->ExecuteScript(WebScriptSource("selectRange();"));
- EXPECT_EQ("ir", mainFrame->ToWebLocalFrame()->SelectionAsText().Utf8());
+ EXPECT_EQ("ir", mainFrame->SelectionAsText().Utf8());
WebViewImpl()->SelectionBounds(base_rect, extent_rect);
WebPoint initialPoint(base_rect.x, base_rect.y);
@@ -1029,8 +1029,8 @@ TEST_P(VisualViewportTest,
// right and down one line.
VisualViewport& visual_viewport = GetFrame()->GetPage()->GetVisualViewport();
visual_viewport.Move(ScrollOffset(60, 25));
- mainFrame->ToWebLocalFrame()->MoveRangeSelection(initialPoint, endPoint);
- EXPECT_EQ("t ", mainFrame->ToWebLocalFrame()->SelectionAsText().Utf8());
+ mainFrame->MoveRangeSelection(initialPoint, endPoint);
+ EXPECT_EQ("t ", mainFrame->SelectionAsText().Utf8());
}
// Test that the scrollFocusedEditableElementIntoRect method works with the
@@ -1635,7 +1635,7 @@ TEST_P(VisualViewportTest, TestChangingContentSizeAffectsScrollBounds) {
LocalFrameView& frame_view = *WebViewImpl()->MainFrameImpl()->GetFrameView();
- WebViewImpl()->MainFrame()->ExecuteScript(
+ WebViewImpl()->MainFrameImpl()->ExecuteScript(
WebScriptSource("var content = document.getElementById(\"content\");"
"content.style.width = \"1500px\";"
"content.style.height = \"2400px\";"));
« no previous file with comments | « third_party/WebKit/Source/web/tests/ViewportTest.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698