chromium/components/favicon_base/select_favicon_frames_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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/favicon_base/select_favicon_frames.h"

#include <stddef.h>

#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/resource/resource_scale_factor.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"

vector;

namespace {

const ui::ResourceScaleFactor FaviconScaleFactor1x[] =;

const ui::ResourceScaleFactor FaviconScaleFactor1xAnd2x[] =;

#define SCOPED_FAVICON_SCALE_FACTOR(list)

#define SCOPED_FAVICON_SCALE_FACTOR_1X
#define SCOPED_FAVICON_SCALE_FACTOR_1XAND2X

// Return gfx::Size vector with the pixel sizes of |bitmaps|.
vector<gfx::Size> SizesFromBitmaps(const vector<SkBitmap>& bitmaps) {}

SkBitmap MakeBitmap(SkColor color, int w, int h) {}

SkColor GetColor(const gfx::ImageSkia& image, float scale,
                 int x = -1, int y = -1) {}

SkColor GetColor1x(const gfx::ImageSkia& image) {}

SkColor GetColor2x(const gfx::ImageSkia& image) {}

TEST(SelectFaviconFramesTest, ZeroSizePicksLargest) {}

TEST(SelectFaviconFramesTest, _16From16) {}

TEST(SelectFaviconFramesTest, _16From17) {}

TEST(SelectFaviconFramesTest, _16From15) {}

TEST(SelectFaviconFramesTest, _16From16_Scale2x_32_From_16) {}

TEST(SelectFaviconFramesTest, _16From16_Scale2x_32_From_32) {}

TEST(SelectFaviconFramesTest, ExactMatchBetterThanLargeBitmap) {}

TEST(SelectFaviconFramesTest, UpsampleABitBetterThanHugeBitmap) {}

TEST(SelectFaviconFramesTest, DownsamplingBetterThanUpsampling) {}

TEST(SelectFaviconFramesTest, DownsamplingLessIsBetter) {}

TEST(SelectFaviconFramesTest, UpsamplingLessIsBetter) {}

// Test that the score is determined by the |original_sizes| parameter, not the
// |bitmaps| parameter to SelectFaviconFrames().
TEST(SelectFaviconFramesTest, ScoreDeterminedByOriginalSizes) {}

}  // namespace