#include "content/browser/webrtc/webrtc_internals.h"
#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/values.h"
#include "content/browser/webrtc/webrtc_internals_connections_observer.h"
#include "content/browser/webrtc/webrtc_internals_ui_observer.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace {
const GlobalRenderFrameHostId kFrameId = …;
const int kLid = …;
const int kPid = …;
const int kRequestId = …;
const char kRtcConfiguration[] = …;
const char kUrl[] = …;
const char* const kWakeLockConnectingValues[] = …;
const char* const kWakeLockDisconnectingValues[] = …;
const char kAudioConstraint[] = …;
const char kVideoConstraint[] = …;
const char kStreamId[] = …;
const char kAudioTrackInfo[] = …;
const char kVideoTrackInfo[] = …;
const char kGetUserMediaError[] = …;
const char kGetUserMediaErrorMessage[] = …;
class MockWebRtcInternalsProxy : public WebRTCInternalsUIObserver { … };
class MockWakeLock : public device::mojom::WakeLock { … };
class TestWebRtcConnectionsObserver
: public WebRtcInternalsConnectionsObserver { … };
}
class WebRTCInternalsForTest : public WebRTCInternals { … };
class WebRtcInternalsTest : public testing::Test { … };
TEST_F(WebRtcInternalsTest, AddRemoveObserver) { … }
TEST_F(WebRtcInternalsTest, EnsureNoLogWhenNoObserver) { … }
TEST_F(WebRtcInternalsTest, EnsureLogIsRemovedWhenObserverIsRemoved) { … }
TEST_F(WebRtcInternalsTest, SendAddPeerConnectionUpdate) { … }
TEST_F(WebRtcInternalsTest, SendRemovePeerConnectionUpdate) { … }
TEST_F(WebRtcInternalsTest, SendUpdatePeerConnectionUpdate) { … }
TEST_F(WebRtcInternalsTest, AddGetUserMedia) { … }
TEST_F(WebRtcInternalsTest, UpdateGetUserMediaSuccess) { … }
TEST_F(WebRtcInternalsTest, UpdateGetUserMediaError) { … }
TEST_F(WebRtcInternalsTest, AddGetDisplayMedia) { … }
TEST_F(WebRtcInternalsTest, UpdateGetDisplayMediaSuccess) { … }
TEST_F(WebRtcInternalsTest, UpdateGetDisplayMediaError) { … }
TEST_F(WebRtcInternalsTest, SendAllUpdateWithGetUserMedia) { … }
TEST_F(WebRtcInternalsTest, SendAllUpdateWithGetDisplayMedia) { … }
TEST_F(WebRtcInternalsTest, SendAllUpdatesWithPeerConnectionUpdate) { … }
TEST_F(WebRtcInternalsTest, OnAddStandardStats) { … }
TEST_F(WebRtcInternalsTest, OnAddLegacyStats) { … }
TEST_F(WebRtcInternalsTest, AudioDebugRecordingsFileSelectionCanceled) { … }
TEST_F(WebRtcInternalsTest, WakeLockCreateRemove) { … }
TEST_F(WebRtcInternalsTest, WakeLockConnecting) { … }
TEST_F(WebRtcInternalsTest, WakeLockConnectingSequence) { … }
TEST_F(WebRtcInternalsTest, WakeLockDisconnecting) { … }
TEST_F(WebRtcInternalsTest, WakeLockDisconnectingSequence) { … }
TEST_F(WebRtcInternalsTest, WakeLockReconnect) { … }
TEST_F(WebRtcInternalsTest, WakeLockMultplePeerConnections) { … }
TEST_F(WebRtcInternalsTest, TestWebRtcConnectionsObserver) { … }
}