chromium/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc

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

#include "content/browser/renderer_host/media/media_stream_ui_proxy.h"

#include <string>
#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/gmock_move_support.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/render_frame_host_delegate.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/media_stream_request.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/navigation_simulator.h"
#include "content/test/test_render_view_host.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/permissions_policy/permissions_policy.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h"
#include "ui/gfx/geometry/rect.h"
#include "url/gurl.h"
#include "url/origin.h"

_;
Return;
SaveArg;

namespace content {

namespace {
class MockRenderFrameHostDelegate : public RenderFrameHostDelegate {};

class MockResponseCallback {};

class MockMediaStreamUI : public MediaStreamUI {};

class MockStopStreamHandler {};

class MockChangeSourceStreamHandler {};

}  // namespace

class MediaStreamUIProxyTest : public testing::Test {};

MATCHER_P(SameRequest, expected, "") {}

TEST_F(MediaStreamUIProxyTest, Deny) {}

TEST_F(MediaStreamUIProxyTest, AcceptAndStart) {}

// Verify that the proxy can be deleted before the request is processed.
TEST_F(MediaStreamUIProxyTest, DeleteBeforeAccepted) {}

TEST_F(MediaStreamUIProxyTest, StopFromUI) {}

TEST_F(MediaStreamUIProxyTest, WindowIdCallbackCalled) {}

TEST_F(MediaStreamUIProxyTest, ChangeSourceFromUI) {}

TEST_F(MediaStreamUIProxyTest, ChangeTabSourceFromUI) {}

// Basic tests for permissions policy checks through the MediaStreamUIProxy.
// These tests are not meant to cover every edge case as the PermissionsPolicy
// class itself is tested thoroughly in permissions_policy_unittest.cc and in
// render_frame_host_permissions_policy_unittest.cc.
class MediaStreamUIProxyPermissionsPolicyTest
    : public RenderViewHostImplTestHarness {};

TEST_F(MediaStreamUIProxyPermissionsPolicyTest, PermissionsPolicy) {}

}  // namespace content