#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/snapshot/snapshot.h"
#include <stddef.h>
#include <stdint.h>
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/win/windows_version.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "ui/aura/test/aura_test_helper.h"
#include "ui/aura/test/test_screen.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/paint_recorder.h"
#include "ui/compositor/test/draw_waiter_for_test.h"
#include "ui/compositor/test/test_context_factories.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/geometry/transform.h"
#include "ui/gfx/image/image.h"
#include "ui/gl/gl_implementation.h"
namespace ui {
namespace {
SkColor GetExpectedColorForPoint(int x, int y) { … }
class TestPaintingWindowDelegate : public aura::test::TestWindowDelegate { … };
size_t GetFailedPixelsCountWithScaleFactor(const gfx::Image& image,
int scale_factor) { … }
size_t GetFailedPixelsCount(const gfx::Image& image) { … }
}
class SnapshotAuraTest : public testing::Test { … };
#if BUILDFLAG(IS_WIN) && !defined(NDEBUG)
#define MAYBE_FullScreenWindow …
#elif BUILDFLAG(IS_LINUX)
#define MAYBE_FullScreenWindow …
#else
#define MAYBE_FullScreenWindow …
#endif
TEST_F(SnapshotAuraTest, MAYBE_FullScreenWindow) { … }
TEST_F(SnapshotAuraTest, PartialBounds) { … }
TEST_F(SnapshotAuraTest, Rotated) { … }
TEST_F(SnapshotAuraTest, UIScale) { … }
TEST_F(SnapshotAuraTest, DeviceScaleFactor) { … }
TEST_F(SnapshotAuraTest, RotateAndUIScale) { … }
TEST_F(SnapshotAuraTest, RotateAndUIScaleAndScaleFactor) { … }
}