chromium/third_party/blink/renderer/modules/webtransport/test_utils.cc

// Copyright 2020 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/webtransport/test_utils.h"

#include "base/check.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/renderer/bindings/core/v8/iterable.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_tester.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_web_transport_options.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/streams/readable_stream.h"
#include "third_party/blink/renderer/core/streams/readable_stream_generic_reader.h"
#include "third_party/blink/renderer/modules/webtransport/web_transport.h"
#include "third_party/blink/renderer/platform/heap/visitor.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {

bool CreateDataPipeForWebTransportTests(
    mojo::ScopedDataPipeProducerHandle* producer,
    mojo::ScopedDataPipeConsumerHandle* consumer) {}

v8::Local<v8::Value> ReadValueFromStream(const V8TestingScope& scope,
                                         ReadableStream* stream) {}

TestWebTransportCreator::TestWebTransportCreator() = default;

void TestWebTransportCreator::Init(ScriptState* script_state,
                                   CreateStubCallback create_stub) {}

TestWebTransportCreator::~TestWebTransportCreator() {}

// Implementation of mojom::blink::WebTransportConnector.
void TestWebTransportCreator::Connect(
    const KURL&,
    Vector<network::mojom::blink::WebTransportCertificateFingerprintPtr>,
    mojo::PendingRemote<network::mojom::blink::WebTransportHandshakeClient>
        pending_handshake_client) {}

void TestWebTransportCreator::BindConnector(
    mojo::ScopedMessagePipeHandle handle) {}

void TestWebTransportCreator::Reset() {}

}  // namespace blink