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

Unified Diff: third_party/WebKit/Source/web/tests/SelectionTestBase.h

Issue 1774123006: Implement link selection on alt+mouse drag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698