chromium/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc

// Copyright 2016 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/remoteplayback/remote_playback.h"

#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_remote_playback_availability_callback.h"
#include "third_party/blink/renderer/core/dom/events/native_event_listener.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/html/media/html_media_element.h"
#include "third_party/blink/renderer/core/html/media/html_video_element.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/core/testing/mock_function_scope.h"
#include "third_party/blink/renderer/modules/presentation/presentation_controller.h"
#include "third_party/blink/renderer/modules/remoteplayback/html_media_element_remote_playback.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/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"

namespace blink {

namespace {

class MockFunction : public ScriptFunction::Callable {};

class MockEventListenerForRemotePlayback : public NativeEventListener {};

class MockPresentationController final : public PresentationController {};
}  // namespace

class RemotePlaybackTest : public testing::Test,
                           private ScopedRemotePlaybackBackendForTest {};

TEST_F(RemotePlaybackTest, PromptCancelledRejectsWithNotAllowedError) {}

TEST_F(RemotePlaybackTest, PromptConnectedRejectsWhenCancelled) {}

TEST_F(RemotePlaybackTest, PromptConnectedResolvesWhenDisconnected) {}

TEST_F(RemotePlaybackTest, StateChangeEvents) {}

TEST_F(RemotePlaybackTest,
       DisableRemotePlaybackRejectsPromptWithInvalidStateError) {}

TEST_F(RemotePlaybackTest, DisableRemotePlaybackCancelsAvailabilityCallbacks) {}

TEST_F(RemotePlaybackTest, CallingWatchAvailabilityFromAvailabilityCallback) {}

TEST_F(RemotePlaybackTest, PromptThrowsWhenBackendDisabled) {}

TEST_F(RemotePlaybackTest, WatchAvailabilityWorksWhenBackendDisabled) {}

TEST_F(RemotePlaybackTest, IsListening) {}

TEST_F(RemotePlaybackTest, NullContextDoesntCrash) {}

TEST_F(RemotePlaybackTest, GetAvailabilityUrl) {}

}  // namespace blink