chromium/third_party/blink/renderer/modules/mediastream/media_stream_set_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/mediastream/media_stream_set.h"

#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/modules/mediastream/web_platform_media_stream_source.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/public/web/modules/mediastream/media_stream_video_source.h"
#include "third_party/blink/public/web/web_heap.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h"
#include "third_party/blink/renderer/modules/mediastream/test/fake_image_capturer.h"
#include "third_party/blink/renderer/modules/mediastream/user_media_request.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_component_impl.h"
#include "third_party/blink/renderer/platform/testing/io_task_runner_testing_platform_support.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"

_;

namespace blink {

namespace {

class MockLocalMediaStreamVideoSource : public blink::MediaStreamVideoSource {};

class MediaStreamSetTest : public testing::Test {};

MediaStreamComponent* MakeMockVideoComponent() {}

// This test checks if |MediaStreamSet| calls the initialized callback if used
// for getAllScreensMedia with a single stream requested, i.e. one descriptor
// with one video source passed in the constructor.
TEST_F(MediaStreamSetTest, GetAllScreensMediaSingleMediaStreamInitialized) {}

// This test checks if |MediaStreamSet| calls the initialized callback if used
// for getAllScreensMedia with a multiple streams requested, i.e.
// multiple descriptors with one video source each passed in the constructor.
TEST_F(MediaStreamSetTest, GetAllScreensMediaMultipleMediaStreamsInitialized) {}

// This test checks if |MediaStreamSet| calls the initialized callback if used
// for getAllScreensMedia with a no streams requested, i.e.
// an empty descriptors list.
TEST_F(MediaStreamSetTest, GetAllScreensMediaNoMediaStreamInitialized) {}

// This test checks if |MediaStreamSet| calls the initialized callback if used
// for getDisplayMedia with a single stream requested, i.e. one descriptor
// with one video source passed in the constructor.
TEST_F(MediaStreamSetTest, GetDisplayMediaSingleMediaStreamInitialized) {}

// This test checks if |MediaStreamSet| calls the initialized callback if used
// for getDisplayMedia with a no streams requested, i.e.
// an empty descriptors list.
TEST_F(MediaStreamSetTest, GetDisplayMediaNoMediaStreamInitialized) {}

}  // namespace

}  // namespace blink