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

// Copyright 2022 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/scrollbar_theme_fluent.h"

#include <memory>

#include "base/gtest_prod_util.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/scroll/scroll_types.h"
#include "third_party/blink/renderer/core/scroll/scrollbar.h"
#include "third_party/blink/renderer/core/scroll/scrollbar_test_suite.h"
#include "third_party/blink/renderer/core/testing/scoped_mock_overlay_scrollbars.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/native_theme/native_theme_features.h"

namespace blink {

Return;

namespace {

// Const values for unit tests.
constexpr int kScrollbarLength =;
constexpr int kOffsetFromViewport =;

}  // namespace

class ScrollbarThemeFluentMock : public ScrollbarThemeFluent {};

class ScrollbarThemeFluentTest : public ::testing::TestWithParam<float> {};

class OverlayScrollbarThemeFluentTest : public ScrollbarThemeFluentTest {};

// Test that the scrollbar's thickness scales appropriately with the thumb's
// thickness and always maintains proportion with the DIP scale.
TEST_P(ScrollbarThemeFluentTest, ScrollbarThicknessScalesProperly) {}

// Test that Scrollbar objects are correctly sized with Fluent theme parts.
TEST_P(ScrollbarThemeFluentTest, VerticalScrollbarPartsSizes) {}

// Test that Scrollbar objects are correctly sized with Fluent theme parts.
TEST_P(ScrollbarThemeFluentTest, HorizontalScrollbarPartsSizes) {}

// The test verifies that the background paint is not invalidated when
// the thumb position changes. Aura scrollbars change arrow buttons color
// when the scroll offset changes from and to the min/max scroll offset.
// Fluent scrollbars do not change the arrow buttons color in this case.
TEST_P(ScrollbarThemeFluentTest, ScrollbarBackgroundInvalidationTest) {}

// Test that Scrollbar objects are correctly sized with Overlay Fluent theme
// parts.
TEST_P(OverlayScrollbarThemeFluentTest, OverlaySetsCorrectTrackAndInsetSize) {}

// Same as ScrollbarThemeFluentTest.ScrollbarThicknessScalesProperly, but for
// Overlay Scrollbars.
TEST_P(OverlayScrollbarThemeFluentTest, ScrollbarThicknessScalesProperly) {}

TEST_P(OverlayScrollbarThemeFluentTest, TestVerticalInsetTrackRect) {}

TEST_P(OverlayScrollbarThemeFluentTest, TestHorizontalInsetTrackRect) {}

TEST_P(OverlayScrollbarThemeFluentTest, TestVerticalInsetButtonRect) {}

TEST_P(OverlayScrollbarThemeFluentTest, TestHorizontalInsetButtonRect) {}

INSTANTIATE_TEST_SUITE_P();
INSTANTIATE_TEST_SUITE_P();

}  // namespace blink