#include <memory>
#include <tuple>
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "cc/base/switches.h"
#include "cc/input/scroll_utils.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/input/synthetic_gesture.h"
#include "content/common/input/synthetic_gesture_controller.h"
#include "content/common/input/synthetic_gesture_params.h"
#include "content/common/input/synthetic_gesture_target.h"
#include "content/common/input/synthetic_smooth_scroll_gesture.h"
#include "content/common/input/synthetic_smooth_scroll_gesture_params.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/common/content_switches.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/features.h"
#include "third_party/blink/public/common/switches.h"
#include "ui/base/ui_base_features.h"
#include "ui/native_theme/native_theme_features.h"
namespace {
constexpr int kIntermediateScrollOffset = …;
const std::string kOverflowScrollDataURL = …;
const std::string kMainFrameScrollDataURL = …;
const std::string kSubframeScrollDataURL = …;
const std::string kMirroredScrollersDataURL = …;
}
namespace content {
class ScrollBehaviorBrowserTest : public ContentBrowserTest { … };
class ScrollBehaviorBrowserTestWithPercentBasedScrolling
: public ScrollBehaviorBrowserTest { … };
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTest,
DISABLED_InstantScriptScrollAbortsSmoothScriptScroll) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_InstantScriptScrollAdjustsSmoothWheelScroll …
#else
#define MAYBE_InstantScriptScrollAdjustsSmoothWheelScroll …
#endif
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTestWithPercentBasedScrolling,
MAYBE_InstantScriptScrollAdjustsSmoothWheelScroll) { … }
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTest,
InstantScriptScrollAdjustsSmoothWheelScroll) { … }
void ScrollBehaviorBrowserTest::
RunTestInstantScriptScrollAdjustsSmoothWheelScroll() { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_SmoothWheelScrollCompletesWithScriptedMirror …
#else
#define MAYBE_SmoothWheelScrollCompletesWithScriptedMirror …
#endif
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTestWithPercentBasedScrolling,
MAYBE_SmoothWheelScrollCompletesWithScriptedMirror) { … }
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTest,
SmoothWheelScrollCompletesWithScriptedMirror) { … }
void ScrollBehaviorBrowserTest::
RunTestSmoothWheelScrollCompletesWithScriptedMirror() { … }
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTest,
OneSmoothScriptScrollAbortsAnother_Element) { … }
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTest,
DISABLED_TouchScrollAbortsSmoothScriptScroll) { … }
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTest,
DISABLED_WheelScrollAbortsSmoothScriptScroll) { … }
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTest,
DISABLED_OneSmoothScriptScrollAbortsAnother_Document) { … }
IN_PROC_BROWSER_TEST_F(ScrollBehaviorBrowserTest,
DISABLED_OneSmoothScriptScrollAbortsAnother_Subframe) { … }
}