#include "ui/gfx/color_analysis.h"
#include <stddef.h>
#include <stdint.h>
#include <exception>
#include <vector>
#include "base/functional/bind.h"
#include "skia/ext/platform_canvas.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/image/image.h"
namespace color_utils {
const unsigned char k1x1White[] = …;
const unsigned char k1x3BlueWhite[] = …;
const unsigned char k1x3BlueRed[] = …;
const HSL kDefaultLowerBound = …;
const HSL kDefaultUpperBound = …;
scoped_refptr<base::RefCountedMemory> CreateTestPNG(
const std::vector<SkColor>& colors) { … }
class MockKMeanImageSampler : public KMeanImageSampler { … };
bool ChannelApproximatelyEqual(int expected, uint8_t channel) { … }
class ColorAnalysisTest : public testing::Test { … };
TEST_F(ColorAnalysisTest, CalculatePNGKMeanAllWhite) { … }
TEST_F(ColorAnalysisTest, CalculatePNGKMeanIgnoreWhiteLightness) { … }
TEST_F(ColorAnalysisTest, CalculatePNGKMeanPickMostCommon) { … }
TEST_F(ColorAnalysisTest, CalculatePNGKMeanIgnoreRedHue) { … }
TEST_F(ColorAnalysisTest, CalculatePNGKMeanIgnoreGreySaturation) { … }
TEST_F(ColorAnalysisTest, GridSampler) { … }
TEST_F(ColorAnalysisTest, FindClosestColor) { … }
TEST_F(ColorAnalysisTest, CalculateKMeanColorOfBitmap) { … }
TEST_F(ColorAnalysisTest, CalculateKMeanColorOfSmallImage) { … }
TEST_F(ColorAnalysisTest, ComputeProminentColors) { … }
TEST_F(ColorAnalysisTest, ComputeColorSwatches) { … }
TEST_F(ColorAnalysisTest, ComputeColorSwatches_MaxConsideredPixels) { … }
TEST_F(ColorAnalysisTest, ComputeColorSwatches_Filter) { … }
}