#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "services/image_annotation/public/cpp/image_processor.h"
#include <cmath>
#include <limits>
#include "base/functional/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "services/image_annotation/image_annotation_metrics.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/codec/jpeg_codec.h"
namespace image_annotation {
namespace {
Eq;
Lt;
constexpr double kMaxError = …;
SkBitmap GenCheckerboardBitmap(const int dim) { … }
double CalcImageError(const SkBitmap& orig, const SkBitmap& comp) { … }
void OutputImageError(double* const error,
const SkBitmap& expected,
const std::vector<uint8_t>& result,
const int32_t width,
const int32_t height) { … }
}
TEST(ImageProcessorTest, NullImage) { … }
TEST(ImageProcessorTest, ImageContent) { … }
}