#include "components/headless/test/bitmap_utils.h"
#include <string_view>
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "testing/gmock/include/gmock/gmock.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/gfx/codec/png_codec.h"
namespace headless {
namespace {
bool DecodePNG(const std::string& png_data, SkBitmap* bitmap) { … }
SkBitmap LoadTestImage(std::string_view file_name) { … }
}
struct ColorRectTestData { … };
constexpr ColorRectTestData kColorRectTestData[] = …;
class HeadlessBitmapUtilsColorRectTest
: public ::testing::Test,
public ::testing::WithParamInterface<ColorRectTestData> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(HeadlessBitmapUtilsColorRectTest, Basic) { … }
}