chromium/content/browser/renderer_host/input/wheel_scroll_latching_browsertest.cc

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

#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/input/render_widget_host_input_event_router.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/hit_test_region_observer.h"
#include "content/shell/browser/shell.h"
#include "third_party/blink/public/common/input/synthetic_web_input_event_builders.h"
#include "ui/events/gesture_detection/gesture_configuration.h"

#if BUILDFLAG(IS_ANDROID)
#include "content/browser/renderer_host/render_widget_host_view_android.h"
#endif

WebMouseWheelEvent;

namespace {
void GiveItSomeTime() {}

const char kWheelEventLatchingDataURL[] =;
}  // namespace

namespace content {
class WheelScrollLatchingBrowserTest : public ContentBrowserTest {};

// Start scrolling by mouse wheel on the document: the wheel event will be sent
// to the document's scrolling element, the scrollable div will be under the
// cursor after applying the scrolling. Continue scrolling by mouse wheel, since
// wheel scroll latching is enabled the wheel event will be still sent to the
// document's scrolling element and the document's scrolling element will
// continue scrolling.
IN_PROC_BROWSER_TEST_F(WheelScrollLatchingBrowserTest, WheelEventTarget) {}

// TODO(crbug.com/1248231, crbug.com/1313237): consider removing this test.
IN_PROC_BROWSER_TEST_F(WheelScrollLatchingBrowserTest,
                       DISABLED_WheelEventRetargetWhenTargetRemoved) {}

// crbug.com/777258 Flaky everywhere.
IN_PROC_BROWSER_TEST_F(
    WheelScrollLatchingBrowserTest,
    DISABLED_WheelScrollingRelatchWhenLatchedScrollerRemoved) {}

const char kWheelRetargetIfPreventedByDefault[] =;

IN_PROC_BROWSER_TEST_F(WheelScrollLatchingBrowserTest,
                       WheelEventRetargetOnPreventDefault) {}

}  // namespace content