chromium/third_party/blink/renderer/platform/peerconnection/task_queue_factory_test.cc

// Copyright 2021 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/webrtc_overrides/task_queue_factory.h"

#include <string>
#include <vector>

#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/test/task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/api/field_trials_view.h"
#include "third_party/webrtc/api/task_queue/task_queue_test.h"
#include "third_party/webrtc_overrides/metronome_source.h"
#include "third_party/webrtc_overrides/test/metronome_like_task_queue_test.h"
#include "third_party/webrtc_overrides/timer_based_tick_provider.h"

namespace blink {

namespace {

TaskQueueTest;

// Test-only factory needed for the TaskQueueTest suite.
class TestTaskQueueFactory final : public webrtc::TaskQueueFactory {};

std::unique_ptr<webrtc::TaskQueueFactory> CreateTaskQueueFactory(
    const webrtc::FieldTrialsView*) {}

// Instantiate suite to run all tests defined in
// third_party/webrtc/api/task_queue/task_queue_test.h.
INSTANTIATE_TEST_SUITE_P();

// Provider needed for the MetronomeLikeTaskQueueTest suite.
class TaskQueueProvider : public MetronomeLikeTaskQueueProvider {};

// Instantiate suite to run all tests defined in
// third_party/webrtc_overrides/test/metronome_like_task_queue_test.h
INSTANTIATE_TEST_SUITE_P();

}  // namespace

}  // namespace blink