#include "base/test/scoped_feature_list.h"
#include "cc/base/features.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features_generated.h"
#include "third_party/blink/public/mojom/frame/find_in_page.mojom-blink.h"
#include "third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom-blink.h"
#include "third_party/blink/public/web/web_script_source.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_focus_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_scroll_into_view_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_scroll_to_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_boolean_scrollintoviewoptions.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/frame/find_in_page.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/root_frame_viewport.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/html/html_iframe_element.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/scroll/scroll_alignment.h"
#include "third_party/blink/renderer/core/scroll/scroll_into_view_util.h"
#include "third_party/blink/renderer/core/testing/sim/sim_compositor.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
namespace blink {
namespace {
class ScrollIntoViewTest : public SimTest,
public ::testing::WithParamInterface<
std::vector<base::test::FeatureRef>> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(ScrollIntoViewTest, InstantScroll) { … }
TEST_P(ScrollIntoViewTest, ScrollPaddingOnDocumentElWhenBodyDefinesViewport) { … }
TEST_P(ScrollIntoViewTest,
ScrollPaddingOnDocumentElWhenDocumentElDefinesViewport) { … }
TEST_P(ScrollIntoViewTest, ScrollPaddingOnBodyWhenDocumentElDefinesViewport) { … }
TEST_P(ScrollIntoViewTest, EmptyScrollportSinceScrollPadding) { … }
TEST_P(ScrollIntoViewTest, SmoothScroll) { … }
TEST_P(ScrollIntoViewTest, NestedContainer) { … }
TEST_P(ScrollIntoViewTest, NewScrollIntoViewAbortsCurrentAnimation) { … }
TEST_P(ScrollIntoViewTest, NoOpScrollIntoViewContinuesCurrentAnimation) { … }
TEST_P(ScrollIntoViewTest, ScrollWindowAbortsCurrentAnimation) { … }
TEST_P(ScrollIntoViewTest, BlockAndInlineSettings) { … }
TEST_P(ScrollIntoViewTest, SmoothAndInstantInChain) { … }
TEST_P(ScrollIntoViewTest, SmoothScrollAnchor) { … }
TEST_P(ScrollIntoViewTest, FindDoesNotScrollOverflowHidden) { … }
TEST_P(ScrollIntoViewTest, ApplyRootElementScrollBehaviorToViewport) { … }
TEST_P(ScrollIntoViewTest, StopAtLayoutViewportForFocusedEditable) { … }
TEST_P(ScrollIntoViewTest, RemoveSequencedScrollableArea) { … }
TEST_P(ScrollIntoViewTest, SmoothUserScrollNotAbortedByProgrammaticScrolls) { … }
TEST_P(ScrollIntoViewTest, LongDistanceSmoothScrollFinishedInThreeSeconds) { … }
TEST_P(ScrollIntoViewTest, OriginCrossingUseCounter) { … }
TEST_P(ScrollIntoViewTest, FromDisplayNoneIframe) { … }
TEST_P(ScrollIntoViewTest, EmptyEditableElementRect) { … }
}
}