chromium/third_party/blink/renderer/modules/webcodecs/codec_pressure_manager_test.cc

// Copyright 2022 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/modules/webcodecs/codec_pressure_manager.h"

#include "base/run_loop.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/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/modules/webcodecs/codec_pressure_gauge.h"
#include "third_party/blink/renderer/modules/webcodecs/codec_pressure_manager_provider.h"
#include "third_party/blink/renderer/modules/webcodecs/reclaimable_codec.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/heap_test_utilities.h"
#include "third_party/blink/renderer/platform/heap/thread_state.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"

namespace blink {

namespace {

static constexpr size_t kTestPressureThreshold =;

class FakeReclaimableCodec final
    : public GarbageCollected<FakeReclaimableCodec>,
      public ReclaimableCodec {};

}  // namespace

class CodecPressureManagerTest
    : public testing::TestWithParam<ReclaimableCodec::CodecType> {};

TEST_P(CodecPressureManagerTest, OneManagerPerContext) {}

TEST_P(CodecPressureManagerTest, AllManagersIncrementGlobalPressureGauge) {}

TEST_P(CodecPressureManagerTest,
       ManagersAreInitializedWithGlobalPressureValue) {}

TEST_P(CodecPressureManagerTest, DifferentManagersForEncodersAndDecoders) {}

TEST_P(CodecPressureManagerTest, DisposedCodecsRemovePressure) {}

TEST_P(CodecPressureManagerTest, ZeroPressureThreshold) {}

TEST_P(CodecPressureManagerTest, AddRemovePressure) {}

TEST_P(CodecPressureManagerTest, PressureDoesntReclaimForegroundCodecs) {}

TEST_P(CodecPressureManagerTest, PressureStartsTimers) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace blink