#include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/test/test_trace_processor.h"
#include "base/test/trace_test_utils.h"
#include "build/buildflag.h"
#include "cc/paint/paint_op.h"
#include "cc/test/paint_op_matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/abseil-cpp/absl/status/status.h"
#include "third_party/blink/renderer/bindings/core/v8/script_evaluation_result.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h"
#include "third_party/blink/renderer/core/html/canvas/recording_test_utils.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/script/classic_script.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h"
ClearRectFlags;
FillFlags;
RecordedOpsAre;
DrawRectOp;
PaintOpEq;
Contains;
ElementsAre;
Eq;
StartsWith;
namespace blink {
class HTMLCanvasElementTest : public RenderingTest,
public PaintTestConfigurations { … };
INSTANTIATE_PAINT_TEST_SUITE_P(…);
void HTMLCanvasElementTest::TearDown() { … }
TEST_P(HTMLCanvasElementTest, CleanCanvasResizeDoesntClearFrameBuffer) { … }
TEST_P(HTMLCanvasElementTest, CanvasResizeClearsFrameBuffer) { … }
TEST_P(HTMLCanvasElementTest, CreateLayerUpdatesCompositing) { … }
TEST_P(HTMLCanvasElementTest, CanvasInvalidation) { … }
TEST_P(HTMLCanvasElementTest, CanvasNotInvalidatedOnFirstFrameInDOM) { … }
TEST_P(HTMLCanvasElementTest, CanvasNotInvalidatedOnFirstPaint) { … }
TEST_P(HTMLCanvasElementTest, CanvasInvalidationInFrame) { … }
TEST_P(HTMLCanvasElementTest, BrokenCanvasHighRes) { … }
class HTMLCanvasElementWithTracingTest : public RenderingTest { … };
class HTMLCanvasElementWithTracingSyncTest
: public HTMLCanvasElementWithTracingTest,
public testing::WithParamInterface<const char*> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(HTMLCanvasElementWithTracingSyncTest,
CanvasReadbackEmitsIdentifiabilityTraces) { … }
class HTMLCanvasElementWithTracingAsyncTest
: public HTMLCanvasElementWithTracingTest,
public testing::WithParamInterface<std::pair<const char*, const char*>> { … };
INSTANTIATE_TEST_SUITE_P(…);
class Resolve final : public ScriptFunction::Callable { … };
TEST_P(HTMLCanvasElementWithTracingAsyncTest,
CanvasReadbackEmitsIdentifiabilityTraces) { … }
}