#include "third_party/blink/renderer/modules/peerconnection/rtc_data_channel.h"
#include <memory>
#include <string>
#include <utility>
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/test_simple_task_runner.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/core/event_type_names.h"
#include "third_party/blink/renderer/core/fileapi/blob.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/testing/null_execution_context.h"
#include "third_party/blink/renderer/modules/peerconnection/mock_rtc_peer_connection_handler_platform.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/page_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.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/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
namespace {
_;
void RunSynchronous(base::TestSimpleTaskRunner* thread,
CrossThreadOnceClosure closure) { … }
class MockEventListener final : public NativeEventListener { … };
class MockPeerConnectionHandler : public MockRTCPeerConnectionHandlerPlatform { … };
class MockDataChannel : public webrtc::DataChannelInterface { … };
class RTCDataChannelTest : public ::testing::Test { … };
}
TEST_F(RTCDataChannelTest, ChangeStateEarly) { … }
TEST_F(RTCDataChannelTest, BufferedAmount) { … }
TEST_F(RTCDataChannelTest, BufferedAmountLow) { … }
TEST_F(RTCDataChannelTest, Open) { … }
TEST_F(RTCDataChannelTest, Close) { … }
TEST_F(RTCDataChannelTest, Message) { … }
TEST_F(RTCDataChannelTest, SendAfterContextDestroyed) { … }
TEST_F(RTCDataChannelTest, CloseAfterContextDestroyed) { … }
TEST_F(RTCDataChannelTest, StopsThrottling) { … }
TEST_F(RTCDataChannelTest, TransfersDisabled) { … }
TEST_F(RTCDataChannelTest, TransferableInCreationScopeOnly) { … }
TEST_F(RTCDataChannelTest, TransferAllowedOnlyOnce) { … }
TEST_F(RTCDataChannelTest, SendPreventsTransfers) { … }
}