| Index: third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| index 739f9643f2d6aef262e7ec5d2b5e2648d03e3f8d..e9d4b48e14ff8816a0b5913aef880802c2094455 100644
|
| --- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| @@ -66,6 +66,7 @@
|
| #include "platform/geometry/IntSize.h"
|
| #include "platform/graphics/Color.h"
|
| #include "platform/graphics/GraphicsContext.h"
|
| +#include "platform/graphics/GraphicsLayer.h"
|
| #include "platform/graphics/paint/PaintRecordBuilder.h"
|
| #include "platform/scroll/ScrollTypes.h"
|
| #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
|
| @@ -73,6 +74,7 @@
|
| #include "platform/testing/UnitTestHelpers.h"
|
| #include "platform/wtf/PtrUtil.h"
|
| #include "public/platform/Platform.h"
|
| +#include "public/platform/WebCoalescedInputEvent.h"
|
| #include "public/platform/WebDisplayMode.h"
|
| #include "public/platform/WebDragData.h"
|
| #include "public/platform/WebDragOperation.h"
|
| @@ -133,7 +135,9 @@ enum VerticalScrollbarState {
|
|
|
| class TestData {
|
| public:
|
| - void SetWebView(WebView* web_view) { web_view_ = ToWebViewImpl(web_view); }
|
| + void SetWebView(WebView* web_view) {
|
| + web_view_ = static_cast<WebViewBase*>(web_view);
|
| + }
|
| void SetSize(const WebSize& new_size) { size_ = new_size; }
|
| HorizontalScrollbarState GetHorizontalScrollbarState() const {
|
| return web_view_->HasHorizontalScrollbar() ? kVisibleHorizontalScrollbar
|
| @@ -148,7 +152,7 @@ class TestData {
|
|
|
| private:
|
| WebSize size_;
|
| - WebViewImpl* web_view_;
|
| + WebViewBase* web_view_;
|
| };
|
|
|
| class AutoResizeWebViewClient : public FrameTestHelpers::TestWebViewClient {
|
| @@ -394,7 +398,7 @@ TEST_P(WebViewTest, SetBaseBackgroundColor) {
|
| const WebColor kTranslucentPutty = 0x80BFB196;
|
| const WebColor kTransparent = 0x00000000;
|
|
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| EXPECT_EQ(kWhite, web_view->BackgroundColor());
|
|
|
| web_view->SetBaseBackgroundColor(kBlue);
|
| @@ -448,8 +452,8 @@ TEST_P(WebViewTest, SetBaseBackgroundColor) {
|
| TEST_P(WebViewTest, SetBaseBackgroundColorBeforeMainFrame) {
|
| const WebColor kBlue = 0xFF0000FF;
|
| FrameTestHelpers::TestWebViewClient web_view_client;
|
| - WebViewImpl* web_view =
|
| - WebViewImpl::Create(&web_view_client, kWebPageVisibilityStateVisible);
|
| + WebViewBase* web_view = static_cast<WebViewBase*>(
|
| + WebView::Create(&web_view_client, kWebPageVisibilityStateVisible));
|
| EXPECT_NE(kBlue, web_view->BackgroundColor());
|
| // webView does not have a frame yet, but we should still be able to set the
|
| // background color.
|
| @@ -468,7 +472,7 @@ TEST_P(WebViewTest, SetBaseBackgroundColorAndBlendWithExistingContent) {
|
| const int kWidth = 100;
|
| const int kHeight = 100;
|
|
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
|
|
| // Set WebView background to green with alpha.
|
| web_view->SetBaseBackgroundColor(kAlphaGreen);
|
| @@ -504,7 +508,7 @@ TEST_P(WebViewTest, SetBaseBackgroundColorAndBlendWithExistingContent) {
|
|
|
| TEST_P(WebViewTest, FocusIsInactive) {
|
| RegisterMockedHttpURLLoad("visible_iframe.html");
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "visible_iframe.html");
|
|
|
| web_view->SetFocus(true);
|
| @@ -667,7 +671,7 @@ void WebViewTest::TestAutoResize(
|
| base_url_ + "specify_size.html?" + page_width + ":" + page_height;
|
| URLTestHelpers::RegisterMockedURLLoad(
|
| ToKURL(url), testing::WebTestDataPath("specify_size.html"));
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(url, true, 0, &client);
|
| client.GetTestData().SetWebView(web_view);
|
|
|
| @@ -776,7 +780,7 @@ TEST_P(WebViewTest, AutoResizeMaxSize) {
|
| void WebViewTest::TestTextInputType(WebTextInputType expected_type,
|
| const std::string& html_file) {
|
| RegisterMockedHttpURLLoad(html_file);
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + html_file);
|
| WebInputMethodControllerImpl* controller =
|
| web_view->MainFrameImpl()->GetInputMethodController();
|
| @@ -803,7 +807,7 @@ TEST_P(WebViewTest, TextInputType) {
|
| TEST_P(WebViewTest, TextInputInfoUpdateStyleAndLayout) {
|
| FrameTestHelpers::TestWebViewClient client;
|
| FrameTestHelpers::WebViewHelper web_view_helper;
|
| - WebViewImpl* web_view_impl = web_view_helper.Initialize(true, 0, &client);
|
| + WebViewBase* web_view_impl = web_view_helper.Initialize(true, 0, &client);
|
|
|
| WebURL base_url = URLTestHelpers::ToKURL("http://example.com/");
|
| // Here, we need to construct a document that has a special property:
|
| @@ -839,7 +843,7 @@ TEST_P(WebViewTest, TextInputInfoUpdateStyleAndLayout) {
|
| void WebViewTest::TestInputMode(WebTextInputMode expected_input_mode,
|
| const std::string& html_file) {
|
| RegisterMockedHttpURLLoad(html_file);
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + html_file);
|
| web_view_impl->SetInitialFocus(false);
|
| EXPECT_EQ(expected_input_mode, web_view_impl->MainFrameImpl()
|
| @@ -890,7 +894,7 @@ TEST_P(WebViewTest, TextInputInfoWithReplacedElements) {
|
| URLTestHelpers::RegisterMockedURLLoad(
|
| ToKURL("http://www.test.com/foo.png"),
|
| testing::WebTestDataPath("white-1x1.png"));
|
| - WebViewImpl* web_view_impl = web_view_helper_.InitializeAndLoad(url);
|
| + WebViewBase* web_view_impl = web_view_helper_.InitializeAndLoad(url);
|
| web_view_impl->SetInitialFocus(false);
|
| WebTextInputInfo info = web_view_impl->MainFrameImpl()
|
| ->GetInputMethodController()
|
| @@ -901,7 +905,7 @@ TEST_P(WebViewTest, TextInputInfoWithReplacedElements) {
|
|
|
| TEST_P(WebViewTest, SetEditableSelectionOffsetsAndTextInputInfo) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| web_view->SetInitialFocus(false);
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| @@ -935,7 +939,7 @@ TEST_P(WebViewTest, SetEditableSelectionOffsetsAndTextInputInfo) {
|
| // Regression test for crbug.com/663645
|
| TEST_P(WebViewTest, FinishComposingTextDoesNotAssert) {
|
| RegisterMockedHttpURLLoad("input_field_default.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_default.html");
|
| web_view->SetInitialFocus(false);
|
|
|
| @@ -965,7 +969,7 @@ TEST_P(WebViewTest, FinishComposingTextDoesNotAssert) {
|
|
|
| TEST_P(WebViewTest, FinishComposingTextCursorPositionChange) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| web_view->SetInitialFocus(false);
|
|
|
| @@ -1017,7 +1021,7 @@ TEST_P(WebViewTest, FinishComposingTextCursorPositionChange) {
|
|
|
| TEST_P(WebViewTest, SetCompositionForNewCaretPositions) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| web_view->SetInitialFocus(false);
|
| WebInputMethodController* active_input_method_controller =
|
| @@ -1133,7 +1137,7 @@ TEST_P(WebViewTest, SetCompositionForNewCaretPositions) {
|
|
|
| TEST_P(WebViewTest, SetCompositionWithEmptyText) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| web_view->SetInitialFocus(false);
|
| WebInputMethodController* active_input_method_controller =
|
| @@ -1174,7 +1178,7 @@ TEST_P(WebViewTest, SetCompositionWithEmptyText) {
|
|
|
| TEST_P(WebViewTest, CommitTextForNewCaretPositions) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| web_view->SetInitialFocus(false);
|
| WebInputMethodController* active_input_method_controller =
|
| @@ -1247,7 +1251,7 @@ TEST_P(WebViewTest, CommitTextForNewCaretPositions) {
|
|
|
| TEST_P(WebViewTest, CommitTextWhileComposing) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| web_view->SetInitialFocus(false);
|
| WebInputMethodController* active_input_method_controller =
|
| @@ -1318,7 +1322,7 @@ TEST_P(WebViewTest, CommitTextWhileComposing) {
|
|
|
| TEST_P(WebViewTest, FinishCompositionDoesNotRevealSelection) {
|
| RegisterMockedHttpURLLoad("form_with_input.html");
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "form_with_input.html");
|
| web_view->Resize(WebSize(800, 600));
|
| web_view->SetInitialFocus(false);
|
| @@ -1352,7 +1356,7 @@ TEST_P(WebViewTest, FinishCompositionDoesNotRevealSelection) {
|
|
|
| TEST_P(WebViewTest, InsertNewLinePlacementAfterFinishComposingText) {
|
| RegisterMockedHttpURLLoad("text_area_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "text_area_populated.html");
|
| web_view->SetInitialFocus(false);
|
|
|
| @@ -1395,7 +1399,7 @@ TEST_P(WebViewTest, InsertNewLinePlacementAfterFinishComposingText) {
|
|
|
| TEST_P(WebViewTest, ExtendSelectionAndDelete) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| web_view->SetInitialFocus(false);
|
| @@ -1457,7 +1461,7 @@ TEST_P(WebViewTest, DeleteSurroundingText) {
|
|
|
| TEST_P(WebViewTest, SetCompositionFromExistingText) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| web_view->SetInitialFocus(false);
|
| WebVector<WebCompositionUnderline> underlines(static_cast<size_t>(1));
|
| @@ -1483,7 +1487,7 @@ TEST_P(WebViewTest, SetCompositionFromExistingText) {
|
|
|
| TEST_P(WebViewTest, SetCompositionFromExistingTextInTextArea) {
|
| RegisterMockedHttpURLLoad("text_area_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "text_area_populated.html");
|
| web_view->SetInitialFocus(false);
|
| WebVector<WebCompositionUnderline> underlines(static_cast<size_t>(1));
|
| @@ -1526,7 +1530,7 @@ TEST_P(WebViewTest, SetCompositionFromExistingTextInTextArea) {
|
|
|
| TEST_P(WebViewTest, SetCompositionFromExistingTextInRichText) {
|
| RegisterMockedHttpURLLoad("content_editable_rich_text.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "content_editable_rich_text.html");
|
| web_view->SetInitialFocus(false);
|
| WebVector<WebCompositionUnderline> underlines(static_cast<size_t>(1));
|
| @@ -1541,7 +1545,7 @@ TEST_P(WebViewTest, SetCompositionFromExistingTextInRichText) {
|
|
|
| TEST_P(WebViewTest, SetEditableSelectionOffsetsKeepsComposition) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| web_view->SetInitialFocus(false);
|
|
|
| @@ -1611,7 +1615,7 @@ TEST_P(WebViewTest, SetEditableSelectionOffsetsKeepsComposition) {
|
|
|
| TEST_P(WebViewTest, IsSelectionAnchorFirst) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| WebLocalFrame* frame = web_view->MainFrameImpl();
|
|
|
| @@ -1627,7 +1631,7 @@ TEST_P(WebViewTest, IsSelectionAnchorFirst) {
|
|
|
| TEST_P(WebViewTest, ExitingDeviceEmulationResetsPageScale) {
|
| RegisterMockedHttpURLLoad("200-by-300.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "200-by-300.html");
|
| web_view_impl->Resize(WebSize(200, 300));
|
|
|
| @@ -1651,7 +1655,7 @@ TEST_P(WebViewTest, ExitingDeviceEmulationResetsPageScale) {
|
|
|
| TEST_P(WebViewTest, HistoryResetScrollAndScaleState) {
|
| RegisterMockedHttpURLLoad("200-by-300.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "200-by-300.html");
|
| web_view_impl->Resize(WebSize(100, 150));
|
| web_view_impl->UpdateAllLifecyclePhases();
|
| @@ -1705,7 +1709,7 @@ TEST_P(WebViewTest, HistoryResetScrollAndScaleState) {
|
|
|
| TEST_P(WebViewTest, BackForwardRestoreScroll) {
|
| RegisterMockedHttpURLLoad("back_forward_restore_scroll.html");
|
| - WebViewImpl* web_view_impl = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view_impl = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "back_forward_restore_scroll.html");
|
| web_view_impl->Resize(WebSize(640, 480));
|
| web_view_impl->UpdateAllLifecyclePhases();
|
| @@ -1763,7 +1767,7 @@ TEST_P(WebViewTest, BackForwardRestoreScroll) {
|
| // removed and the page is laid out. http://crbug.com/625683.
|
| TEST_P(WebViewTest, FullscreenResetScrollAndScaleFullscreenStyles) {
|
| RegisterMockedHttpURLLoad("fullscreen_style.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "fullscreen_style.html");
|
| web_view_impl->Resize(WebSize(800, 600));
|
| web_view_impl->UpdateAllLifecyclePhases();
|
| @@ -1803,7 +1807,7 @@ TEST_P(WebViewTest, FullscreenResetScrollAndScaleFullscreenStyles) {
|
| // scroll and scale restoration to occur when we enter fullscreen again.
|
| TEST_P(WebViewTest, FullscreenResetScrollAndScaleExitAndReenter) {
|
| RegisterMockedHttpURLLoad("fullscreen_style.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "fullscreen_style.html");
|
| web_view_impl->Resize(WebSize(800, 600));
|
| web_view_impl->UpdateAllLifecyclePhases();
|
| @@ -1852,7 +1856,7 @@ TEST_P(WebViewTest, FullscreenResetScrollAndScaleExitAndReenter) {
|
|
|
| TEST_P(WebViewTest, EnterFullscreenResetScrollAndScaleState) {
|
| RegisterMockedHttpURLLoad("200-by-300.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "200-by-300.html");
|
| web_view_impl->Resize(WebSize(100, 150));
|
| web_view_impl->UpdateAllLifecyclePhases();
|
| @@ -1911,7 +1915,7 @@ class PrintWebViewClient : public FrameTestHelpers::TestWebViewClient {
|
| TEST_P(WebViewTest, PrintWithXHRInFlight) {
|
| PrintWebViewClient client;
|
| RegisterMockedHttpURLLoad("print_with_xhr_inflight.html");
|
| - WebViewImpl* web_view_impl = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view_impl = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "print_with_xhr_inflight.html", true, 0, &client);
|
|
|
| ASSERT_TRUE(ToLocalFrame(web_view_impl->GetPage()->MainFrame())
|
| @@ -1921,7 +1925,7 @@ TEST_P(WebViewTest, PrintWithXHRInFlight) {
|
| web_view_helper_.Reset();
|
| }
|
|
|
| -static void DragAndDropURL(WebViewImpl* web_view, const std::string& url) {
|
| +static void DragAndDropURL(WebViewBase* web_view, const std::string& url) {
|
| WebDragData drag_data;
|
| drag_data.Initialize();
|
|
|
| @@ -1947,7 +1951,7 @@ TEST_P(WebViewTest, DragDropURL) {
|
| const std::string foo_url = base_url_ + "foo.html";
|
| const std::string bar_url = base_url_ + "bar.html";
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(foo_url);
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(foo_url);
|
|
|
| ASSERT_TRUE(web_view);
|
|
|
| @@ -2048,8 +2052,8 @@ TEST_P(WebViewTest, ClientTapHandling) {
|
| }
|
|
|
| TEST_P(WebViewTest, ClientTapHandlingNullWebViewClient) {
|
| - WebViewImpl* web_view =
|
| - WebViewImpl::Create(nullptr, kWebPageVisibilityStateVisible);
|
| + WebViewBase* web_view = static_cast<WebViewBase*>(
|
| + WebView::Create(nullptr, kWebPageVisibilityStateVisible));
|
| FrameTestHelpers::TestWebFrameClient web_frame_client;
|
| FrameTestHelpers::TestWebWidgetClient web_widget_client;
|
| WebLocalFrame* local_frame = WebLocalFrame::Create(
|
| @@ -2073,7 +2077,7 @@ TEST_P(WebViewTest, ClientTapHandlingNullWebViewClient) {
|
| TEST_P(WebViewTest, LongPressEmptyDiv) {
|
| RegisterMockedHttpURLLoad("long_press_empty_div.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_empty_div.html", true);
|
| web_view->SettingsImpl()->SetAlwaysShowContextMenuOnTouch(false);
|
| web_view->Resize(WebSize(500, 300));
|
| @@ -2094,7 +2098,7 @@ TEST_P(WebViewTest, LongPressEmptyDiv) {
|
| TEST_P(WebViewTest, LongPressEmptyDivAlwaysShow) {
|
| RegisterMockedHttpURLLoad("long_press_empty_div.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_empty_div.html", true);
|
| web_view->SettingsImpl()->SetAlwaysShowContextMenuOnTouch(true);
|
| web_view->Resize(WebSize(500, 300));
|
| @@ -2115,7 +2119,7 @@ TEST_P(WebViewTest, LongPressEmptyDivAlwaysShow) {
|
| TEST_P(WebViewTest, LongPressObject) {
|
| RegisterMockedHttpURLLoad("long_press_object.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_object.html", true);
|
| web_view->SettingsImpl()->SetAlwaysShowContextMenuOnTouch(true);
|
| web_view->Resize(WebSize(500, 300));
|
| @@ -2140,7 +2144,7 @@ TEST_P(WebViewTest, LongPressObject) {
|
| TEST_P(WebViewTest, LongPressObjectFallback) {
|
| RegisterMockedHttpURLLoad("long_press_object_fallback.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_object_fallback.html", true);
|
| web_view->SettingsImpl()->SetAlwaysShowContextMenuOnTouch(true);
|
| web_view->Resize(WebSize(500, 300));
|
| @@ -2165,7 +2169,7 @@ TEST_P(WebViewTest, LongPressObjectFallback) {
|
| TEST_P(WebViewTest, LongPressImage) {
|
| RegisterMockedHttpURLLoad("long_press_image.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_image.html", true);
|
| web_view->SettingsImpl()->SetAlwaysShowContextMenuOnTouch(false);
|
| web_view->Resize(WebSize(500, 300));
|
| @@ -2186,7 +2190,7 @@ TEST_P(WebViewTest, LongPressImage) {
|
| TEST_P(WebViewTest, LongPressVideo) {
|
| RegisterMockedHttpURLLoad("long_press_video.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_video.html", true);
|
| web_view->SettingsImpl()->SetAlwaysShowContextMenuOnTouch(false);
|
| web_view->Resize(WebSize(500, 300));
|
| @@ -2207,7 +2211,7 @@ TEST_P(WebViewTest, LongPressVideo) {
|
| TEST_P(WebViewTest, LongPressLink) {
|
| RegisterMockedHttpURLLoad("long_press_link.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_link.html", true);
|
| web_view->SettingsImpl()->SetAlwaysShowContextMenuOnTouch(false);
|
| web_view->Resize(WebSize(500, 300));
|
| @@ -2231,7 +2235,7 @@ TEST_P(WebViewTest, showContextMenuOnLongPressingLinks) {
|
| URLTestHelpers::RegisterMockedURLLoad(
|
| ToKURL("http://www.test.com/foo.png"),
|
| testing::WebTestDataPath("white-1x1.png"));
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_links_and_images.html", true);
|
|
|
| web_view->SettingsImpl()->SetTouchDragDropEnabled(true);
|
| @@ -2254,7 +2258,7 @@ TEST_P(WebViewTest, showContextMenuOnLongPressingLinks) {
|
| TEST_P(WebViewTest, LongPressEmptyEditableSelection) {
|
| RegisterMockedHttpURLLoad("long_press_empty_editable_selection.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_empty_editable_selection.html", true);
|
| web_view->SettingsImpl()->SetAlwaysShowContextMenuOnTouch(false);
|
| web_view->Resize(WebSize(500, 300));
|
| @@ -2275,7 +2279,7 @@ TEST_P(WebViewTest, LongPressEmptyEditableSelection) {
|
| TEST_P(WebViewTest, LongPressEmptyNonEditableSelection) {
|
| RegisterMockedHttpURLLoad("long_press_image.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "long_press_image.html", true);
|
| web_view->Resize(WebSize(500, 500));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -2297,7 +2301,7 @@ TEST_P(WebViewTest, LongPressEmptyNonEditableSelection) {
|
| TEST_P(WebViewTest, LongPressSelection) {
|
| RegisterMockedHttpURLLoad("longpress_selection.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "longpress_selection.html", true);
|
| web_view->Resize(WebSize(500, 300));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -2317,7 +2321,7 @@ TEST_P(WebViewTest, LongPressSelection) {
|
| TEST_P(WebViewTest, FinishComposingTextDoesNotDismissHandles) {
|
| RegisterMockedHttpURLLoad("longpress_selection.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "longpress_selection.html", true);
|
| web_view->Resize(WebSize(500, 300));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -2353,7 +2357,7 @@ TEST_P(WebViewTest, FinishComposingTextDoesNotDismissHandles) {
|
| TEST_P(WebViewTest, TouchDoesntSelectEmptyTextarea) {
|
| RegisterMockedHttpURLLoad("longpress_textarea.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "longpress_textarea.html", true);
|
| web_view->Resize(WebSize(500, 300));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -2396,7 +2400,7 @@ TEST_P(WebViewTest, TouchDoesntSelectEmptyTextarea) {
|
| TEST_P(WebViewTest, LongPressImageTextarea) {
|
| RegisterMockedHttpURLLoad("longpress_image_contenteditable.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "longpress_image_contenteditable.html", true);
|
| web_view->Resize(WebSize(500, 300));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -2414,7 +2418,7 @@ TEST_P(WebViewTest, LongPressImageTextarea) {
|
| TEST_P(WebViewTest, BlinkCaretAfterLongPress) {
|
| RegisterMockedHttpURLLoad("blink_caret_on_typing_after_long_press.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "blink_caret_on_typing_after_long_press.html", true);
|
| web_view->Resize(WebSize(640, 480));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -2429,7 +2433,7 @@ TEST_P(WebViewTest, BlinkCaretAfterLongPress) {
|
|
|
| TEST_P(WebViewTest, BlinkCaretOnClosingContextMenu) {
|
| RegisterMockedHttpURLLoad("form.html");
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "form.html", true);
|
|
|
| web_view->SetInitialFocus(false);
|
| @@ -2463,7 +2467,7 @@ TEST_P(WebViewTest, BlinkCaretOnClosingContextMenu) {
|
|
|
| TEST_P(WebViewTest, SelectionOnReadOnlyInput) {
|
| RegisterMockedHttpURLLoad("selection_readonly.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "selection_readonly.html", true);
|
| web_view->Resize(WebSize(640, 480));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -2483,7 +2487,7 @@ TEST_P(WebViewTest, SelectionOnReadOnlyInput) {
|
| TEST_P(WebViewTest, KeyDownScrollsHandled) {
|
| RegisterMockedHttpURLLoad("content-width-1000.html");
|
|
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "content-width-1000.html", true);
|
| web_view->Resize(WebSize(100, 100));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -2583,7 +2587,7 @@ TEST_P(WebViewTest, ShowPressOnTransformedLink) {
|
| fake_compositing_web_view_client =
|
| WTF::MakeUnique<FrameTestHelpers::TestWebViewClient>();
|
| FrameTestHelpers::WebViewHelper web_view_helper;
|
| - WebViewImpl* web_view_impl = web_view_helper.Initialize(
|
| + WebViewBase* web_view_impl = web_view_helper.Initialize(
|
| true, nullptr, fake_compositing_web_view_client.get(), nullptr,
|
| &ConfigueCompositingWebView);
|
|
|
| @@ -2644,7 +2648,7 @@ class MockAutofillClient : public WebAutofillClient {
|
| TEST_P(WebViewTest, LosingFocusDoesNotTriggerAutofillTextChange) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| MockAutofillClient client;
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| frame->SetAutofillClient(&client);
|
| @@ -2669,7 +2673,7 @@ TEST_P(WebViewTest, LosingFocusDoesNotTriggerAutofillTextChange) {
|
| frame->SetAutofillClient(0);
|
| }
|
|
|
| -static void VerifySelectionAndComposition(WebViewImpl* web_view,
|
| +static void VerifySelectionAndComposition(WebViewBase* web_view,
|
| int selection_start,
|
| int selection_end,
|
| int composition_start,
|
| @@ -2686,7 +2690,7 @@ static void VerifySelectionAndComposition(WebViewImpl* web_view,
|
| TEST_P(WebViewTest, CompositionNotCancelledByBackspace) {
|
| RegisterMockedHttpURLLoad("composition_not_cancelled_by_backspace.html");
|
| MockAutofillClient client;
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "composition_not_cancelled_by_backspace.html");
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| frame->SetAutofillClient(&client);
|
| @@ -2732,7 +2736,7 @@ TEST_P(WebViewTest, CompositionNotCancelledByBackspace) {
|
| TEST_P(WebViewTest, FinishComposingTextDoesntTriggerAutofillTextChange) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| MockAutofillClient client;
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| frame->SetAutofillClient(&client);
|
| @@ -2774,7 +2778,7 @@ TEST_P(WebViewTest,
|
| SetCompositionFromExistingTextDoesntTriggerAutofillTextChange) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| MockAutofillClient client;
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html", true);
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| frame->SetAutofillClient(&client);
|
| @@ -2828,7 +2832,7 @@ class ViewCreatingWebViewClient : public FrameTestHelpers::TestWebViewClient {
|
| TEST_P(WebViewTest, DoNotFocusCurrentFrameOnNavigateFromLocalFrame) {
|
| ViewCreatingWebViewClient client;
|
| FrameTestHelpers::WebViewHelper web_view_helper;
|
| - WebViewImpl* web_view_impl = web_view_helper.Initialize(true, 0, &client);
|
| + WebViewBase* web_view_impl = web_view_helper.Initialize(true, 0, &client);
|
| web_view_impl->GetPage()
|
| ->GetSettings()
|
| .SetJavaScriptCanOpenWindowsAutomatically(true);
|
| @@ -2855,7 +2859,7 @@ TEST_P(WebViewTest, DoNotFocusCurrentFrameOnNavigateFromLocalFrame) {
|
| TEST_P(WebViewTest, FocusExistingFrameOnNavigate) {
|
| ViewCreatingWebViewClient client;
|
| FrameTestHelpers::WebViewHelper web_view_helper;
|
| - WebViewImpl* web_view_impl = web_view_helper.Initialize(true, 0, &client);
|
| + WebViewBase* web_view_impl = web_view_helper.Initialize(true, 0, &client);
|
| web_view_impl->GetPage()
|
| ->GetSettings()
|
| .SetJavaScriptCanOpenWindowsAutomatically(true);
|
| @@ -2874,7 +2878,9 @@ TEST_P(WebViewTest, FocusExistingFrameOnNavigate) {
|
| WebURLRequest web_url_request_with_target_start;
|
| FrameLoadRequest request_with_target_start(
|
| 0, web_url_request_with_target_start.ToResourceRequest(), "_start");
|
| - ToLocalFrame(ToWebViewImpl(client.CreatedWebView())->GetPage()->MainFrame())
|
| + ToLocalFrame(static_cast<WebViewBase*>(client.CreatedWebView())
|
| + ->GetPage()
|
| + ->MainFrame())
|
| ->Loader()
|
| .Load(request_with_target_start);
|
| EXPECT_TRUE(client.DidFocusCalled());
|
| @@ -2936,7 +2942,7 @@ TEST_P(WebViewTest, ChooseValueFromDateTimeChooser) {
|
| RuntimeEnabledFeatures::setInputMultipleFieldsUIEnabled(false);
|
| DateTimeChooserWebViewClient client;
|
| std::string url = RegisterMockedHttpURLLoad("date_time_chooser.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(url, true, 0, &client);
|
|
|
| Document* document =
|
| @@ -3051,7 +3057,7 @@ TEST_P(WebViewTest, SmartClipData) {
|
| WebString clip_html;
|
| RegisterMockedHttpURLLoad("Ahem.ttf");
|
| RegisterMockedHttpURLLoad("smartclip.html");
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "smartclip.html");
|
| web_view->Resize(WebSize(500, 500));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -3087,7 +3093,7 @@ TEST_P(WebViewTest, SmartClipDataWithPinchZoom) {
|
| WebString clip_html;
|
| RegisterMockedHttpURLLoad("Ahem.ttf");
|
| RegisterMockedHttpURLLoad("smartclip.html");
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "smartclip.html");
|
| web_view->Resize(WebSize(500, 500));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -3105,7 +3111,7 @@ TEST_P(WebViewTest, SmartClipReturnsEmptyStringsWhenUserSelectIsNone) {
|
| WebString clip_html;
|
| RegisterMockedHttpURLLoad("Ahem.ttf");
|
| RegisterMockedHttpURLLoad("smartclip_user_select_none.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "smartclip_user_select_none.html");
|
| web_view->Resize(WebSize(500, 500));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -3121,7 +3127,7 @@ TEST_P(WebViewTest, SmartClipDoesNotCrashPositionReversed) {
|
| WebString clip_html;
|
| RegisterMockedHttpURLLoad("Ahem.ttf");
|
| RegisterMockedHttpURLLoad("smartclip_reversed_positions.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "smartclip_reversed_positions.html");
|
| web_view->Resize(WebSize(500, 500));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -3252,7 +3258,7 @@ TEST_P(WebViewTest, HasTouchEventHandlers) {
|
| // otherwise ChromeClient will default to assuming there are touch handlers.
|
| WebLayerTreeView* layer_tree_view = client.InitializeLayerTreeView();
|
| std::string url = RegisterMockedHttpURLLoad("has_touch_event_handlers.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(url, true, 0, 0, &client);
|
| ASSERT_TRUE(layer_tree_view);
|
| const EventHandlerRegistry::EventHandlerClass kTouchEvent =
|
| @@ -3380,7 +3386,7 @@ TEST_P(WebViewTest, HasTouchEventHandlers) {
|
| // by layout tests under fast/events/.
|
| TEST_P(WebViewTest, DeleteElementWithRegisteredHandler) {
|
| std::string url = RegisterMockedHttpURLLoad("simple_div.html");
|
| - WebViewImpl* web_view_impl = web_view_helper_.InitializeAndLoad(url, true);
|
| + WebViewBase* web_view_impl = web_view_helper_.InitializeAndLoad(url, true);
|
|
|
| Persistent<Document> document =
|
| web_view_impl->MainFrameImpl()->GetFrame()->GetDocument();
|
| @@ -3406,7 +3412,7 @@ TEST_P(WebViewTest, DeleteElementWithRegisteredHandler) {
|
| // This test verifies the text input flags are correctly exposed to script.
|
| TEST_P(WebViewTest, TextInputFlags) {
|
| std::string url = RegisterMockedHttpURLLoad("text_input_flags.html");
|
| - WebViewImpl* web_view_impl = web_view_helper_.InitializeAndLoad(url, true);
|
| + WebViewBase* web_view_impl = web_view_helper_.InitializeAndLoad(url, true);
|
| web_view_impl->SetInitialFocus(false);
|
|
|
| WebLocalFrameImpl* frame = web_view_impl->MainFrameImpl();
|
| @@ -3466,7 +3472,7 @@ TEST_P(WebViewTest, TextInputFlags) {
|
| TEST_P(WebViewTest, FirstUserGestureObservedKeyEvent) {
|
| RegisterMockedHttpURLLoad("form.html");
|
| MockAutofillClient client;
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "form.html", true);
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| frame->SetAutofillClient(&client);
|
| @@ -3490,7 +3496,7 @@ TEST_P(WebViewTest, FirstUserGestureObservedKeyEvent) {
|
| TEST_P(WebViewTest, FirstUserGestureObservedMouseEvent) {
|
| RegisterMockedHttpURLLoad("form.html");
|
| MockAutofillClient client;
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "form.html", true);
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| frame->SetAutofillClient(&client);
|
| @@ -3514,7 +3520,7 @@ TEST_P(WebViewTest, FirstUserGestureObservedMouseEvent) {
|
|
|
| TEST_P(WebViewTest, CompositionIsUserGesture) {
|
| RegisterMockedHttpURLLoad("input_field_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_populated.html");
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| MockAutofillClient client;
|
| @@ -3534,7 +3540,7 @@ TEST_P(WebViewTest, CompositionIsUserGesture) {
|
|
|
| TEST_P(WebViewTest, CompareSelectAllToContentAsText) {
|
| RegisterMockedHttpURLLoad("longpress_selection.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "longpress_selection.html", true);
|
|
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| @@ -3726,7 +3732,7 @@ TEST_P(WebViewTest, ShowUnhandledTapUIIfNeededWithMutateDom) {
|
| RegisterMockedHttpURLLoad("Ahem.ttf");
|
| RegisterMockedHttpURLLoad(test_file);
|
| UnhandledTapWebViewClient client;
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + test_file, true, 0, &client);
|
| web_view->Resize(WebSize(500, 300));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -3751,7 +3757,7 @@ TEST_P(WebViewTest, ShowUnhandledTapUIIfNeededWithMutateStyle) {
|
| RegisterMockedHttpURLLoad("Ahem.ttf");
|
| RegisterMockedHttpURLLoad(test_file);
|
| UnhandledTapWebViewClient client;
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + test_file, true, 0, &client);
|
| web_view->Resize(WebSize(500, 300));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -3785,7 +3791,7 @@ TEST_P(WebViewTest, ShowUnhandledTapUIIfNeededWithPreventDefault) {
|
| RegisterMockedHttpURLLoad("Ahem.ttf");
|
| RegisterMockedHttpURLLoad(test_file);
|
| UnhandledTapWebViewClient client;
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + test_file, true, 0, &client);
|
| web_view->Resize(WebSize(500, 300));
|
| web_view->UpdateAllLifecyclePhases();
|
| @@ -3829,7 +3835,7 @@ TEST_P(WebViewTest, StopLoadingIfJavaScriptURLReturnsNoStringResult) {
|
| #if OS(MACOSX)
|
| TEST_P(WebViewTest, WebSubstringUtil) {
|
| RegisterMockedHttpURLLoad("content_editable_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "content_editable_populated.html");
|
| web_view->GetSettings()->SetDefaultFontSize(12);
|
| web_view->Resize(WebSize(400, 400));
|
| @@ -3859,7 +3865,7 @@ TEST_P(WebViewTest, WebSubstringUtil) {
|
|
|
| TEST_P(WebViewTest, WebSubstringUtilPinchZoom) {
|
| RegisterMockedHttpURLLoad("content_editable_populated.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "content_editable_populated.html");
|
| web_view->GetSettings()->SetDefaultFontSize(12);
|
| web_view->Resize(WebSize(400, 400));
|
| @@ -3887,7 +3893,7 @@ TEST_P(WebViewTest, WebSubstringUtilPinchZoom) {
|
| TEST_P(WebViewTest, WebSubstringUtilIframe) {
|
| RegisterMockedHttpURLLoad("single_iframe.html");
|
| RegisterMockedHttpURLLoad("visible_iframe.html");
|
| - WebViewImpl* web_view =
|
| + WebViewBase* web_view =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "single_iframe.html");
|
| web_view->GetSettings()->SetDefaultFontSize(12);
|
| web_view->GetSettings()->SetJavaScriptEnabled(true);
|
| @@ -3925,7 +3931,7 @@ TEST_P(WebViewTest, WebSubstringUtilIframe) {
|
| TEST_P(WebViewTest, PasswordFieldEditingIsUserGesture) {
|
| RegisterMockedHttpURLLoad("input_field_password.html");
|
| MockAutofillClient client;
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "input_field_password.html", true);
|
| WebLocalFrameImpl* frame = web_view->MainFrameImpl();
|
| frame->SetAutofillClient(&client);
|
| @@ -3946,13 +3952,13 @@ TEST_P(WebViewTest, PasswordFieldEditingIsUserGesture) {
|
| // stack defers its loads.
|
| TEST_P(WebViewTest, CreatedDuringPageSuspension) {
|
| {
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| EXPECT_FALSE(web_view->GetPage()->Suspended());
|
| }
|
|
|
| {
|
| ScopedPageSuspender suspender;
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| EXPECT_TRUE(web_view->GetPage()->Suspended());
|
| }
|
| }
|
| @@ -3962,7 +3968,7 @@ TEST_P(WebViewTest, CreatedDuringPageSuspension) {
|
| TEST_P(WebViewTest, SubframeBeforeUnloadUseCounter) {
|
| RegisterMockedHttpURLLoad("visible_iframe.html");
|
| RegisterMockedHttpURLLoad("single_iframe.html");
|
| - WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
|
| + WebViewBase* web_view = web_view_helper_.InitializeAndLoad(
|
| base_url_ + "single_iframe.html", true);
|
|
|
| WebFrame* frame = web_view_helper_.WebView()->MainFrame();
|
| @@ -4005,7 +4011,7 @@ TEST_P(WebViewTest, SubframeBeforeUnloadUseCounter) {
|
| // Verify that page loads are deferred until all ScopedPageLoadDeferrers are
|
| // destroyed.
|
| TEST_P(WebViewTest, NestedPageSuspensions) {
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| EXPECT_FALSE(web_view->GetPage()->Suspended());
|
|
|
| {
|
| @@ -4024,7 +4030,7 @@ TEST_P(WebViewTest, NestedPageSuspensions) {
|
| }
|
|
|
| TEST_P(WebViewTest, ClosingPageIsSuspended) {
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| Page* page = web_view_helper_.WebView()->GetPage();
|
| EXPECT_FALSE(page->Suspended());
|
|
|
| @@ -4048,7 +4054,7 @@ TEST_P(WebViewTest, ClosingPageIsSuspended) {
|
|
|
| TEST_P(WebViewTest, ForceAndResetViewport) {
|
| RegisterMockedHttpURLLoad("200-by-300.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "200-by-300.html");
|
| web_view_impl->Resize(WebSize(100, 150));
|
| web_view_impl->LayerTreeView()->SetViewportSize(WebSize(100, 150));
|
| @@ -4094,7 +4100,7 @@ TEST_P(WebViewTest, ForceAndResetViewport) {
|
|
|
| TEST_P(WebViewTest, ViewportOverrideIntegratesDeviceMetricsOffsetAndScale) {
|
| RegisterMockedHttpURLLoad("200-by-300.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "200-by-300.html");
|
| web_view_impl->Resize(WebSize(100, 150));
|
|
|
| @@ -4125,7 +4131,7 @@ TEST_P(WebViewTest, ViewportOverrideIntegratesDeviceMetricsOffsetAndScale) {
|
|
|
| TEST_P(WebViewTest, ViewportOverrideAdaptsToScaleAndScroll) {
|
| RegisterMockedHttpURLLoad("200-by-300.html");
|
| - WebViewImpl* web_view_impl =
|
| + WebViewBase* web_view_impl =
|
| web_view_helper_.InitializeAndLoad(base_url_ + "200-by-300.html");
|
| web_view_impl->Resize(WebSize(100, 150));
|
| web_view_impl->LayerTreeView()->SetViewportSize(WebSize(100, 150));
|
| @@ -4183,7 +4189,7 @@ TEST_P(WebViewTest, ViewportOverrideAdaptsToScaleAndScroll) {
|
| }
|
|
|
| TEST_P(WebViewTest, ResizeForPrintingViewportUnits) {
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| web_view->Resize(WebSize(800, 600));
|
|
|
| WebURL base_url = URLTestHelpers::ToKURL("http://example.com/");
|
| @@ -4226,7 +4232,7 @@ TEST_P(WebViewTest, ResizeForPrintingViewportUnits) {
|
| }
|
|
|
| TEST_P(WebViewTest, WidthMediaQueryWithPageZoomAfterPrinting) {
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| web_view->Resize(WebSize(800, 600));
|
| web_view->SetZoomLevel(WebView::ZoomFactorToZoomLevel(2.0));
|
|
|
| @@ -4261,7 +4267,7 @@ TEST_P(WebViewTest, WidthMediaQueryWithPageZoomAfterPrinting) {
|
| }
|
|
|
| TEST_P(WebViewTest, ViewportUnitsPrintingWithPageZoom) {
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| web_view->Resize(WebSize(800, 600));
|
| web_view->SetZoomLevel(WebView::ZoomFactorToZoomLevel(2.0));
|
|
|
| @@ -4300,7 +4306,7 @@ TEST_P(WebViewTest, ViewportUnitsPrintingWithPageZoom) {
|
| }
|
|
|
| TEST_P(WebViewTest, DeviceEmulationResetScrollbars) {
|
| - WebViewImpl* web_view = web_view_helper_.Initialize();
|
| + WebViewBase* web_view = web_view_helper_.Initialize();
|
| web_view->Resize(WebSize(800, 600));
|
|
|
| WebURL base_url = URLTestHelpers::ToKURL("http://example.com/");
|
|
|