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

Side by Side Diff: third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp

Issue 2860673002: Change all test cases to use WebViewBase instead of WebViewImpl. (Closed)
Patch Set: Address code review comments. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 "core/dom/Range.h" 5 #include "core/dom/Range.h"
6 #include "core/frame/FrameView.h" 6 #include "core/frame/FrameView.h"
7 #include "core/input/EventHandler.h" 7 #include "core/input/EventHandler.h"
8 #include "core/page/ChromeClient.h" 8 #include "core/page/ChromeClient.h"
9 #include "core/page/ContextMenuController.h" 9 #include "core/page/ContextMenuController.h"
10 #include "core/page/FocusController.h" 10 #include "core/page/FocusController.h"
11 #include "core/page/Page.h" 11 #include "core/page/Page.h"
12 #include "platform/Cursor.h" 12 #include "platform/Cursor.h"
13 #include "platform/testing/URLTestHelpers.h" 13 #include "platform/testing/URLTestHelpers.h"
14 #include "platform/testing/UnitTestHelpers.h" 14 #include "platform/testing/UnitTestHelpers.h"
15 #include "public/platform/WebCoalescedInputEvent.h"
15 #include "public/web/WebSettings.h" 16 #include "public/web/WebSettings.h"
16 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
18 #include "web/WebLocalFrameImpl.h" 19 #include "web/WebLocalFrameImpl.h"
19 #include "web/tests/FrameTestHelpers.h" 20 #include "web/tests/FrameTestHelpers.h"
20 21
21 using ::testing::_; 22 using ::testing::_;
22 23
23 namespace blink { 24 namespace blink {
24 25
(...skipping 17 matching lines...) Expand all
42 int modifiers, 43 int modifiers,
43 int count = 1); 44 int count = 1);
44 void EmulateMouseDown(const IntPoint& click_point, 45 void EmulateMouseDown(const IntPoint& click_point,
45 WebMouseEvent::Button, 46 WebMouseEvent::Button,
46 int modifiers, 47 int modifiers,
47 int count = 1); 48 int count = 1);
48 49
49 String GetSelectionText(); 50 String GetSelectionText();
50 51
51 FrameTestHelpers::WebViewHelper helper_; 52 FrameTestHelpers::WebViewHelper helper_;
52 WebViewImpl* web_view_ = nullptr; 53 WebViewBase* web_view_ = nullptr;
53 Persistent<WebLocalFrameImpl> main_frame_ = nullptr; 54 Persistent<WebLocalFrameImpl> main_frame_ = nullptr;
54 }; 55 };
55 56
56 void LinkSelectionTestBase::EmulateMouseDrag(const IntPoint& down_point, 57 void LinkSelectionTestBase::EmulateMouseDrag(const IntPoint& down_point,
57 const IntPoint& up_point, 58 const IntPoint& up_point,
58 int modifiers, 59 int modifiers,
59 DragFlags drag_flags) { 60 DragFlags drag_flags) {
60 if (drag_flags & kSendDownEvent) { 61 if (drag_flags & kSendDownEvent) {
61 const auto& down_event = FrameTestHelpers::CreateMouseEvent( 62 const auto& down_event = FrameTestHelpers::CreateMouseEvent(
62 WebMouseEvent::kMouseDown, WebMouseEvent::Button::kLeft, down_point, 63 WebMouseEvent::kMouseDown, WebMouseEvent::Button::kLeft, down_point,
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 CheckMouseClicks(*element, false); 332 CheckMouseClicks(*element, false);
332 } 333 }
333 334
334 { 335 {
335 SCOPED_TRACE("Text div, double click"); 336 SCOPED_TRACE("Text div, double click");
336 CheckMouseClicks(*element, true); 337 CheckMouseClicks(*element, true);
337 } 338 }
338 } 339 }
339 340
340 } // namespace blink 341 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698