#include "third_party/blink/renderer/modules/csspaint/paint_worklet_proxy_client.h"
#include <memory>
#include <utility>
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/test_simple_task_runner.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.h"
#include "third_party/blink/renderer/core/css/cssom/cross_thread_style_value.h"
#include "third_party/blink/renderer/core/css/cssom/css_paint_worklet_input.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/core/workers/worker_reporting_proxy.h"
#include "third_party/blink/renderer/modules/csspaint/paint_worklet.h"
#include "third_party/blink/renderer/modules/csspaint/paint_worklet_global_scope.h"
#include "third_party/blink/renderer/modules/worklet/worklet_thread_test_common.h"
#include "third_party/blink/renderer/platform/graphics/paint_worklet_paint_dispatcher.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"
namespace blink {
class FakeTaskRunner : public base::SingleThreadTaskRunner { … };
class PaintWorkletProxyClientTest : public RenderingTest { … };
TEST_F(PaintWorkletProxyClientTest, PaintWorkletProxyClientConstruction) { … }
void RunAddGlobalScopesTestOnWorklet(
WorkerThread* thread,
PaintWorkletProxyClient* proxy_client,
scoped_refptr<FakeTaskRunner> compositor_task_runner,
base::WaitableEvent* waitable_event) { … }
TEST_F(PaintWorkletProxyClientTest, AddGlobalScopes) { … }
void RunPaintTestOnWorklet(WorkerThread* thread,
PaintWorkletProxyClient* proxy_client,
base::WaitableEvent* waitable_event) { … }
TEST_F(PaintWorkletProxyClientTest, Paint) { … }
void RunDefinitionsMustBeCompatibleTestOnWorklet(
WorkerThread* thread,
PaintWorkletProxyClient* proxy_client,
base::WaitableEvent* waitable_event) { … }
TEST_F(PaintWorkletProxyClientTest, DefinitionsMustBeCompatible) { … }
namespace {
class ScopedFakeMainThreadTaskRunner { … };
}
void RunAllDefinitionsMustBeRegisteredBeforePostingTestOnWorklet(
WorkerThread* thread,
PaintWorkletProxyClient* proxy_client,
base::WaitableEvent* waitable_event) { … }
TEST_F(PaintWorkletProxyClientTest,
AllDefinitionsMustBeRegisteredBeforePosting) { … }
}