#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/input/web_coalesced_input_event.h"
#include "third_party/blink/public/web/web_settings.h"
#include "third_party/blink/renderer/core/dom/events/native_event_listener.h"
#include "third_party/blink/renderer/core/dom/range.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/input/event_handler.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/context_menu_controller.h"
#include "third_party/blink/renderer/core/page/focus_controller.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/cursor/mojom/cursor_type.mojom-blink.h"
#include "ui/events/event_constants.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
_;
namespace blink {
class LinkSelectionTestBase : public testing::Test { … };
void LinkSelectionTestBase::EmulateMouseDrag(const gfx::Point& down_point,
const gfx::Point& up_point,
int modifiers,
DragFlags drag_flags) { … }
void LinkSelectionTestBase::EmulateMouseClick(const gfx::Point& click_point,
WebMouseEvent::Button button,
int modifiers,
int count) { … }
void LinkSelectionTestBase::EmulateMouseDown(const gfx::Point& click_point,
WebMouseEvent::Button button,
int modifiers,
int count) { … }
String LinkSelectionTestBase::GetSelectionText() { … }
class TestFrameClient : public frame_test_helpers::TestWebFrameClient { … };
class LinkSelectionTest : public LinkSelectionTestBase { … };
TEST_F(LinkSelectionTest, MouseDragWithoutAltAllowNoLinkSelection) { … }
TEST_F(LinkSelectionTest, MouseDragWithAltAllowSelection) { … }
TEST_F(LinkSelectionTest, HandCursorDuringLinkDrag) { … }
TEST_F(LinkSelectionTest, DragOnNothingShowsPointer) { … }
TEST_F(LinkSelectionTest, CaretCursorOverLinkDuringSelection) { … }
TEST_F(LinkSelectionTest, HandCursorOverLinkAfterContextMenu) { … }
TEST_F(LinkSelectionTest, SingleClickWithAltStartsDownload) { … }
TEST_F(LinkSelectionTest, DoubleAltClickNotDownloadAndSelectWord) { … }
TEST_F(LinkSelectionTest, TwoSingleAltClicksDoubleDownloadAndNotSelectWord) { … }
TEST_F(LinkSelectionTest, SingleClickWithAltStartsDownloadWhenTextSelected) { … }
class LinkSelectionClickEventsTest : public LinkSelectionTestBase { … };
TEST_F(LinkSelectionClickEventsTest, SingleAndDoubleClickWillBeHandled) { … }
}