#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 test {
class TestOnThread : public base::SimpleThread { … };
}
class ImageSkiaTest : public testing::Test { … };
TEST_F(ImageSkiaTest, FixedSource) { … }
TEST_F(ImageSkiaTest, FixedScaledSource) { … }
TEST_F(ImageSkiaTest, FixedUnscaledSource) { … }
TEST_F(ImageSkiaTest, DynamicSource) { … }
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
TEST_F(ImageSkiaTest, Unscaled) { … }
namespace {
std::vector<float> GetSortedScaleFactors(const gfx::ImageSkia& image) { … }
}
TEST_F(ImageSkiaTest, ArbitraryScaleFactor) { … }
TEST_F(ImageSkiaTest, ArbitraryScaleFactorWithMissingResource) { … }
TEST_F(ImageSkiaTest, UnscaledImageForArbitraryScaleFactor) { … }
TEST_F(ImageSkiaTest, SupportedScaleValue) { … }
}