chromium/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker_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/peerconnection/peer_connection_tracker.h"

#include <memory>

#include "base/run_loop.h"
#include "base/types/pass_key.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom-blink.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/renderer/modules/mediastream/media_constraints.h"
#include "third_party/blink/renderer/modules/peerconnection/fake_rtc_rtp_transceiver_impl.h"
#include "third_party/blink/renderer/modules/peerconnection/mock_peer_connection_dependency_factory.h"
#include "third_party/blink/renderer/modules/peerconnection/mock_rtc_peer_connection_handler_client.h"
#include "third_party/blink/renderer/modules/peerconnection/mock_rtc_peer_connection_handler_platform.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/peerconnection/rtc_offer_options_platform.h"
#include "third_party/blink/renderer/platform/peerconnection/rtc_rtp_receiver_platform.h"
#include "third_party/blink/renderer/platform/peerconnection/rtc_rtp_sender_platform.h"
#include "third_party/blink/renderer/platform/peerconnection/rtc_rtp_transceiver_platform.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"

_;

namespace blink {

const char* kDefaultTransceiverString =;

class MockPeerConnectionTrackerHost
    : public blink::mojom::blink::PeerConnectionTrackerHost {};

// Creates a transceiver that is expected to be logged as
// |kDefaultTransceiverString|.
//
// This is used in unittests that don't care about the specific attributes of
// the transceiver.
std::unique_ptr<RTCRtpTransceiverPlatform> CreateDefaultTransceiver() {}

namespace {

// TODO(https://crbug.com/868868): Move this into a separate file.
class MockPeerConnectionHandler : public RTCPeerConnectionHandler {};

webrtc::PeerConnectionInterface::RTCConfiguration DefaultConfig() {}

}  // namespace

class PeerConnectionTrackerTest : public ::testing::Test {};

TEST_F(PeerConnectionTrackerTest, TrackCreateOffer) {}

TEST_F(PeerConnectionTrackerTest, OnSuspend) {}

TEST_F(PeerConnectionTrackerTest, OnThermalStateChange) {}

TEST_F(PeerConnectionTrackerTest, OnSpeedLimitChange) {}

TEST_F(PeerConnectionTrackerTest, ReportInitialThermalState) {}

TEST_F(PeerConnectionTrackerTest, AddTransceiverWithOptionalValuesPresent) {}

TEST_F(PeerConnectionTrackerTest, AddTransceiverWithOptionalValuesNull) {}

TEST_F(PeerConnectionTrackerTest, ModifyTransceiver) {}

TEST_F(PeerConnectionTrackerTest, IceCandidateError) {}

// TODO(hta): Write tests for the other tracking functions.

}  // namespace blink