OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SelectionTestBase_h | |
6 #define SelectionTestBase_h | |
7 | |
8 #include "web/WebLocalFrameImpl.h" | |
9 #include "web/tests/FrameTestHelpers.h" | |
10 | |
11 #include <gtest/gtest.h> | |
12 #include <string> | |
13 | |
14 namespace blink { | |
15 class IntPoint; | |
16 class WebViewImpl; | |
17 class WebLocalFrameImpl; | |
18 | |
19 class SelectionTestBase : public ::testing::Test { | |
20 protected: | |
21 enum DragFlag { | |
22 SendDownEvent = 1, | |
23 SendUpEvent = 1 << 1 | |
24 }; | |
25 using DragFlags = unsigned; | |
26 | |
27 void emulateMouseDrag(const IntPoint& downPoint, const IntPoint& upPoint, in t modifiers, | |
28 DragFlags = SendDownEvent | SendUpEvent); | |
kotenkov
2016/03/10 12:00:30
I've replaced bool parameters by flags. If it's no
yosin_UTC9
2016/03/11 01:32:07
Using flags seem to be OK.
Better solution is fol
| |
29 | |
30 void emulateMouseClick(const IntPoint& clickPoint, WebMouseEvent::Button, in t modifiers, int count = 1); | |
31 void emulateMouseDown(const IntPoint& clickPoint, WebMouseEvent::Button, int modifiers, int count = 1); | |
32 | |
33 std::string getSelectionText(); | |
34 | |
35 FrameTestHelpers::WebViewHelper m_helper; | |
36 WebViewImpl* m_webView = nullptr; | |
37 RawPtrWillBePersistent<WebLocalFrameImpl> m_mainFrame = nullptr; | |
38 }; | |
39 | |
40 } // namespace blink | |
41 | |
42 #endif // SelectionTestBase_h | |
OLD | NEW |