chromium/ui/compositor_extra/shadow_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 "ui/compositor_extra/shadow.h"

#include "base/test/test_discardable_memory_allocator.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/shadow_util.h"
#include "ui/gfx/shadow_value.h"

namespace ui {
namespace {

FieldsAre;

constexpr int kElevationLarge =;
constexpr int kElevationSmall =;

// A specific elevation used for testing EvictUniquelyOwnedDetail.
constexpr int kElevationUnique =;

gfx::Insets InsetsForElevation(int elevation) {}

gfx::Size NineboxImageSizeForElevationAndCornerRadius(int elevation,
                                                      int corner_radius) {}

// Calculates the minimum shadow content size for given elevation and corner
// radius.
gfx::Size MinContentSizeForElevationAndCornerRadius(int elevation,
                                                    int corner_radius) {}

class ShadowTest : public testing::Test {};

// Test if the proper content bounds is calculated based on the current style.
TEST_F(ShadowTest, SetContentBounds) {}

// Test if the shadow's layer bounds are modified, setting the same content
// bounds can reset the layer bounds.
TEST_F(ShadowTest, ResetLayerBoundsBySettingSameContentBounds) {}

// Test that the elevation is reduced when the contents are too small to handle
// the full elevation.
TEST_F(ShadowTest, AdjustElevationForSmallContents) {}

// Test that rounded corner radius is handled correctly.
TEST_F(ShadowTest, AdjustRoundedCornerRadius) {}

// Test that the uniquely owned shadow image is evicted from the cache when new
// shadow details are created.
TEST_F(ShadowTest, EvictUniquelyOwnedDetail) {}

class ShadowColorTest : public ShadowTest,
                        public testing::WithParamInterface<gfx::ShadowStyle> {};

INSTANTIATE_TEST_SUITE_P();

// Tests the shadow colors are updated when setting elevation to colors map.
TEST_P(ShadowColorTest, ElevationToColorsMap) {}

}  // namespace
}  // namespace ui