#include "third_party/blink/renderer/modules/csspaint/paint_worklet.h"
#include <memory>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_gc_controller.h"
#include "third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.h"
#include "third_party/blink/renderer/core/css/css_syntax_definition.h"
#include "third_party/blink/renderer/core/css/cssom/prepopulated_computed_style_property_map.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/script/classic_script.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/modules/csspaint/css_paint_definition.h"
#include "third_party/blink/renderer/modules/csspaint/paint_worklet_global_scope.h"
#include "third_party/blink/renderer/modules/csspaint/paint_worklet_global_scope_proxy.h"
#include "third_party/blink/renderer/platform/graphics/paint_generated_image.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
namespace blink {
class TestPaintWorklet : public PaintWorklet { … };
class PaintWorkletTest : public PageTestBase { … };
TEST_F(PaintWorkletTest, PaintWithNullPaintArguments) { … }
TEST_F(PaintWorkletTest, SinglyRegisteredDocumentDefinitionNotUsed) { … }
TEST_F(PaintWorkletTest, GlobalScopeSelection) { … }
TEST_F(PaintWorkletTest, NativeAndCustomProperties) { … }
class MainOrOffThreadPaintWorkletTest
: public PageTestBase,
public ::testing::WithParamInterface<bool>,
private ScopedOffMainThreadCSSPaintForTest { … };
INSTANTIATE_TEST_SUITE_P(…);
class MockObserver final : public CSSPaintImageGenerator::Observer { … };
TEST_P(MainOrOffThreadPaintWorkletTest, ConsistentGlobalScopeOnMainThread) { … }
#if defined(THREAD_SANITIZER)
#define MAYBE_AllGlobalScopesMustBeCreated …
#else
#define MAYBE_AllGlobalScopesMustBeCreated …
#endif
TEST_P(MainOrOffThreadPaintWorkletTest, MAYBE_AllGlobalScopesMustBeCreated) { … }
TEST_F(PaintWorkletTest, ConsistentGlobalScopeCrossThread) { … }
TEST_F(PaintWorkletTest, GeneratorNotifiedAfterAllRegistrations) { … }
}