chromium/third_party/blink/renderer/core/fetch/bytes_consumer_tee_test.cc

// Copyright 2019 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/core/fetch/bytes_consumer_tee.h"

#include "base/memory/scoped_refptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/fetch/bytes_consumer_test_util.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/platform/blob/blob_data.h"
#include "third_party/blink/renderer/platform/loader/testing/bytes_consumer_test_reader.h"
#include "third_party/blink/renderer/platform/loader/testing/replaying_bytes_consumer.h"
#include "third_party/blink/renderer/platform/network/encoded_form_data.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"

namespace blink {

namespace {

Result;

class BytesConsumerTestClient final
    : public GarbageCollected<BytesConsumerTestClient>,
      public BytesConsumer::Client {};

class BytesConsumerTeeTest : public PageTestBase {};

class FakeBlobBytesConsumer : public BytesConsumer {};

class FakeFormDataBytesConsumer : public BytesConsumer {};

TEST_F(BytesConsumerTeeTest, CreateDone) {}

TEST_F(BytesConsumerTeeTest, TwoPhaseRead) {}

TEST_F(BytesConsumerTeeTest, TwoPhaseReadWithDataAndDone) {}

TEST_F(BytesConsumerTeeTest, Error) {}

TEST_F(BytesConsumerTeeTest, Cancel) {}

TEST_F(BytesConsumerTeeTest, CancelShouldNotAffectTheOtherDestination) {}

TEST_F(BytesConsumerTeeTest, CancelShouldNotAffectTheOtherDestination2) {}

TEST_F(BytesConsumerTeeTest, BlobHandle) {}

TEST_F(BytesConsumerTeeTest, BlobHandleWithInvalidSize) {}

TEST_F(BytesConsumerTeeTest, FormData) {}

TEST_F(BytesConsumerTeeTest, ConsumerCanBeErroredInTwoPhaseRead) {}

TEST_F(BytesConsumerTeeTest,
       AsyncNotificationShouldBeDispatchedWhenAllDataIsConsumed) {}

TEST_F(BytesConsumerTeeTest,
       AsyncCloseNotificationShouldBeCancelledBySubsequentReadCall) {}

TEST(BytesConusmerTest, ClosedBytesConsumer) {}

TEST(BytesConusmerTest, ErroredBytesConsumer) {}

}  // namespace

}  // namespace blink