chromium/third_party/blink/renderer/core/page/drag_controller_test.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/page/drag_controller.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/page/drag_operation.h"
#include "third_party/blink/renderer/core/clipboard/data_object.h"
#include "third_party/blink/renderer/core/clipboard/data_transfer.h"
#include "third_party/blink/renderer/core/clipboard/data_transfer_access_policy.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/forms/html_text_area_element.h"
#include "third_party/blink/renderer/core/page/autoscroll_controller.h"
#include "third_party/blink/renderer/core/page/drag_data.h"
#include "third_party/blink/renderer/core/page/drag_image.h"
#include "third_party/blink/renderer/core/page/drag_state.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"

namespace blink {

class DragMockChromeClient : public RenderingTestChromeClient {};

class DragControllerTest : public RenderingTest {};

TEST_F(DragControllerTest, DragImageForSelectionUsesPageScaleFactor) {}

class DragControllerSimTest : public SimTest {};

// Tests that dragging a URL onto a WebWidget that doesn't navigate on Drag and
// Drop clears out the Autoscroll state. Regression test for
// https://crbug.com/733996.
TEST_F(DragControllerSimTest, DropURLOnNonNavigatingClearsState) {}

// Verify that conditions that prevent hit testing - such as throttled
// lifecycle updates for frames - are accounted for in the DragController.
// Regression test for https://crbug.com/685030
TEST_F(DragControllerSimTest, ThrottledDocumentHandled) {}

TEST_F(DragControllerTest, DragImageForSelectionClipsToViewport) {}

TEST_F(DragControllerTest, DragImageForSelectionClipsChildFrameToViewport) {}

TEST_F(DragControllerTest,
       DragImageForSelectionClipsChildFrameToViewportWithPageScaleFactor) {}

TEST_F(DragControllerTest, DragImageOffsetWithPageScaleFactor) {}

TEST_F(DragControllerTest, DragLinkWithPageScaleFactor) {}

// Verify that drag and drop of URL from textarea to textarea drops the entire
// URL
TEST_F(DragControllerTest, DragAndDropUrlFromTextareaToTextarea) {}

// Verify that drag and drop of URL from textarea to richly editable div adds an
// anchor element
TEST_F(DragControllerTest, DragAndDropUrlFromTextareaToRichlyEditableDiv) {}

// Verify that drag and drop of URL from textarea to plaintext-only editable div
// populates the entire URL as text
TEST_F(DragControllerTest,
       DragAndDropUrlFromTextareaToPlaintextonlyEditableDiv) {}

TEST_F(DragControllerTest,
       DragAndDropUrlFromTextareaToRichlyEditableParagraph) {}

TEST_F(DragControllerTest,
       DragAndDropUrlFromTextareaToPlaintextonlyEditableParagraph) {}

}  // namespace blink