Index: third_party/WebKit/Source/web/tests/SelectionTestBase.h |
diff --git a/third_party/WebKit/Source/web/tests/SelectionTestBase.h b/third_party/WebKit/Source/web/tests/SelectionTestBase.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a3c5ff0543dbc84eb43d577ccd645ee358e15d30 |
--- /dev/null |
+++ b/third_party/WebKit/Source/web/tests/SelectionTestBase.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SelectionTestBase_h |
+#define SelectionTestBase_h |
+ |
+#include "web/WebLocalFrameImpl.h" |
+#include "web/tests/FrameTestHelpers.h" |
+ |
+#include <gtest/gtest.h> |
tkent
2016/03/25 03:33:03
Don't use <> for gtest.h.
|
+#include <string> |
+ |
+namespace blink { |
+class IntPoint; |
+class WebViewImpl; |
+class WebLocalFrameImpl; |
+ |
+class SelectionTestBase : public ::testing::Test { |
+protected: |
+ enum DragFlag { |
+ SendDownEvent = 1, |
+ SendUpEvent = 1 << 1 |
+ }; |
+ using DragFlags = unsigned; |
+ |
+ void emulateMouseDrag(const IntPoint& downPoint, const IntPoint& upPoint, int modifiers, |
+ DragFlags = SendDownEvent | SendUpEvent); |
+ |
+ void emulateMouseClick(const IntPoint& clickPoint, WebMouseEvent::Button, int modifiers, int count = 1); |
+ void emulateMouseDown(const IntPoint& clickPoint, WebMouseEvent::Button, int modifiers, int count = 1); |
+ |
+ std::string getSelectionText(); |
+ |
+ FrameTestHelpers::WebViewHelper m_helper; |
+ WebViewImpl* m_webView = nullptr; |
+ RawPtrWillBePersistent<WebLocalFrameImpl> m_mainFrame = nullptr; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // SelectionTestBase_h |