chromium/cc/layers/painted_scrollbar_layer_impl_unittest.cc

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

#include "cc/layers/painted_scrollbar_layer_impl.h"

#include <stddef.h>

#include "cc/resources/ui_resource_bitmap.h"
#include "cc/test/layer_tree_impl_test_base.h"
#include "components/viz/common/quads/draw_quad.h"
#include "components/viz/common/quads/solid_color_draw_quad.h"
#include "components/viz/common/quads/texture_draw_quad.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace cc {
namespace {

TEST(PaintedScrollbarLayerImplTest, Occlusion) {}

TEST(PaintedScrollbarLayerImplTest, Occlusion_SolidColorThumbNinePatchTrack) {}

TEST(PaintedScrollbarLayerImplTest, PaintedOpacityChangesInvalidate) {}

class PaintedScrollbarLayerImplSolidColorThumbTest : public ::testing::Test {};

TEST_F(PaintedScrollbarLayerImplSolidColorThumbTest, ComputeThumbQuadRect) {}

TEST_F(PaintedScrollbarLayerImplSolidColorThumbTest,
       ComputeHitTestableThumbQuadRect) {}

class PaintedScrollbarLayerImplFluentOverlayTest
    : public PaintedScrollbarLayerImplSolidColorThumbTest {};

// Since the thumb's drawn thickness is smaller than the track's thickness,
// verify that the computed thickness is the width of the track. This prevents
// cases where clicking on the margin of the thumb would cause the thumb to not
// consider itself clicked/captured.
TEST_F(PaintedScrollbarLayerImplFluentOverlayTest,
       OverlayFluentThumbHasNoMargin) {}

// Test that when no ThumbColor is set with Fluent Scrollbars enabled,
// AppendThumbQuads makes an early return and doesn't append any quads.
TEST_F(PaintedScrollbarLayerImplFluentOverlayTest,
       NoThumbColorDoesntAppendQuads) {}

}  // namespace
}  // namespace cc