chromium/third_party/blink/renderer/platform/graphics/paint_worklet_paint_dispatcher_test.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/graphics/paint_worklet_paint_dispatcher.h"

#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "cc/paint/paint_worklet_job.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/renderer/platform/scheduler/public/non_main_thread.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread_type.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"

_;
NiceMock;
Return;

namespace blink {
namespace {
// We need a thread (or multiple threads) for the (mock) worklets to run on.
std::unique_ptr<NonMainThread> CreateTestThread(const char* name) {}

class PaintWorkletPaintDispatcherAsyncTest : public ::testing::Test {};

class MockPaintWorkletPainter
    : public GarbageCollected<MockPaintWorkletPainter>,
      public PaintWorkletPainter {};

class MockPaintWorkletInput : public cc::PaintWorkletInput {};

cc::PaintWorkletInput* AddPaintWorkletInputToMap(cc::PaintWorkletJobMap& map,
                                                 int worklet_id) {}

class PaintWorkletPaintDispatcherMainThread
    : public PaintWorkletPaintDispatcher {};

}  // namespace

TEST_F(PaintWorkletPaintDispatcherAsyncTest, DispatchedWorkletIsPainted) {}

TEST_F(PaintWorkletPaintDispatcherAsyncTest, DispatchCompletesWithNoPainters) {}

TEST_F(PaintWorkletPaintDispatcherAsyncTest, DispatchHandlesEmptyInput) {}

TEST_F(PaintWorkletPaintDispatcherAsyncTest, DispatchSelectsCorrectPainter) {}

TEST_F(PaintWorkletPaintDispatcherAsyncTest, DispatchIgnoresNonMatchingInput) {}

TEST_F(PaintWorkletPaintDispatcherAsyncTest,
       DispatchCorrectlyAssignsInputsToMultiplePainters) {}

TEST_F(PaintWorkletPaintDispatcherAsyncTest,
       HasOngoingDispatchIsTrackedCorrectly) {}

}  // namespace blink