chromium/third_party/blink/renderer/core/scroll/scrollable_area_test.cc

// Copyright 2015 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/scroll/scrollable_area.h"

#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/core/scroll/scroll_animator_base.h"
#include "third_party/blink/renderer/core/scroll/scroll_types.h"
#include "third_party/blink/renderer/core/scroll/scrollbar_test_suite.h"
#include "third_party/blink/renderer/core/scroll/scrollbar_theme.h"
#include "third_party/blink/renderer/core/scroll/scrollbar_theme_overlay_mock.h"
#include "third_party/blink/renderer/core/style/scroll_start_data.h"
#include "third_party/blink/renderer/core/testing/scoped_mock_overlay_scrollbars.h"
#include "third_party/blink/renderer/platform/geometry/length_functions.h"
#include "third_party/blink/renderer/platform/graphics/color.h"
#include "third_party/blink/renderer/platform/heap/thread_state.h"
#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {

namespace {

_;
Mock;
Return;

class MockAnimatingScrollableArea : public MockScrollableArea {};

class ScrollbarThemeWithMockInvalidation : public ScrollbarThemeOverlayMock {};

}  // namespace

class ScrollableAreaTest : public testing::Test,
                           public PaintTestConfigurations {};

INSTANTIATE_PAINT_TEST_SUITE_P();

TEST_P(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync) {}

TEST_P(ScrollableAreaTest, ScrollbarBackgroundAndThumbRepaint) {}

TEST_P(ScrollableAreaTest, InvalidatesNonCompositedScrollbarsWhenThumbMoves) {}

TEST_P(ScrollableAreaTest, ScrollableAreaDidScroll) {}

TEST_P(ScrollableAreaTest, ProgrammaticScrollRespectAnimatorEnabled) {}

// Scrollbars in popups shouldn't fade out since they aren't composited and thus
// they don't appear on hover so users without a wheel can't scroll if they fade
// out.
TEST_P(ScrollableAreaTest, PopupOverlayScrollbarShouldNotFadeOut) {}

TEST_P(ScrollableAreaTest, ScrollAnimatorCallbackFiresOnAnimationCancel) {}

TEST_P(ScrollableAreaTest, ScrollAnimatorCallbackFiresOnInstantScroll) {}

TEST_P(ScrollableAreaTest, ScrollAnimatorCallbackFiresOnAnimationFinish) {}

TEST_P(ScrollableAreaTest, ScrollBackToInitialPosition) {}

void VerifyOffsetFromScrollStart(ScrollableArea* scrollable_area,
                                 ScrollStartValueType y_type,
                                 ScrollStartValueType x_type,
                                 const Length& y_length,
                                 const Length& x_length,
                                 const ScrollOffset& offset) {}

void test_scroll_start_combination(ScrollableArea* scrollable_area,
                                   ScrollStartValueType y_type,
                                   ScrollStartValueType x_type,
                                   const Length& y_length,
                                   const Length& x_length) {}

TEST_P(ScrollableAreaTest, ScrollOffsetFromScrollStartDataAllCombinations) {}

TEST_P(ScrollableAreaTest, ScrollOffsetFromScrollStartDataNonZeroMin) {}

}  // namespace blink