chromium/ui/gfx/image/image_skia_unittest.cc

// Copyright 2012 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/gfx/image/image_skia.h"

#include <stddef.h>

#include "base/check_op.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/threading/simple_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/resource_scale_factor.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image_skia_rep.h"
#include "ui/gfx/image/image_skia_source.h"
#include "ui/gfx/switches.h"

namespace gfx {

namespace {

class FixedSource : public ImageSkiaSource {};

class FixedScaleSource : public ImageSkiaSource {};

class DynamicSource : public ImageSkiaSource {};

class NullSource: public ImageSkiaSource {};

}  // namespace

namespace test {
class TestOnThread : public base::SimpleThread {};

}  // namespace test

class ImageSkiaTest : public testing::Test {};

TEST_F(ImageSkiaTest, FixedSource) {}

TEST_F(ImageSkiaTest, FixedScaledSource) {}

TEST_F(ImageSkiaTest, FixedUnscaledSource) {}

TEST_F(ImageSkiaTest, DynamicSource) {}

// Tests that image_reps returns all of the representations in the
// image when there are multiple representations for a scale factor.
// This currently is the case with ImageLoader::LoadImages.
TEST_F(ImageSkiaTest, ManyRepsPerScaleFactor) {}

TEST_F(ImageSkiaTest, GetBitmap) {}

TEST_F(ImageSkiaTest, GetBitmapFromEmpty) {}

TEST_F(ImageSkiaTest, BackedBySameObjectAs) {}

#if DCHECK_IS_ON()
TEST_F(ImageSkiaTest, EmptyOnThreadTest) {}

TEST_F(ImageSkiaTest, StaticOnThreadTest) {}

TEST_F(ImageSkiaTest, SourceOnThreadTest) {}
#endif  // DCHECK_IS_ON()

TEST_F(ImageSkiaTest, Unscaled) {}

namespace {

std::vector<float> GetSortedScaleFactors(const gfx::ImageSkia& image) {}

}  // namespace

TEST_F(ImageSkiaTest, ArbitraryScaleFactor) {}

TEST_F(ImageSkiaTest, ArbitraryScaleFactorWithMissingResource) {}

TEST_F(ImageSkiaTest, UnscaledImageForArbitraryScaleFactor) {}

// Tests that searching for representation uses supported scale values and that
// scale values (floats) are not mismatched with scale factors (enums).
TEST_F(ImageSkiaTest, SupportedScaleValue) {}

}  // namespace gfx