Chromium Code Reviews| 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..e5f99670fd847e707242703b36847303c80b38bc |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/web/tests/SelectionTestBase.h |
| @@ -0,0 +1,36 @@ |
| +// 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> |
| +#include <string> |
| + |
| +namespace blink { |
| +class IntPoint; |
| +class WebViewImpl; |
| +class WebLocalFrameImpl; |
| + |
| +class SelectionTestBase : public ::testing::Test { |
|
kotenkov
2016/03/09 17:27:59
This class is not inside the LinkSelectionTest, be
|
| +protected: |
| + void emulateMouseDrag(const IntPoint& downPoint, const IntPoint& upPoint, int modifiers, |
|
yosin_UTC9
2016/03/10 01:40:49
Could you avoid to use |bool| parameters?
|
| + bool sendDownEvent = true, bool sendUpEvent = true); |
| + |
| + 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 |