chromium/third_party/blink/renderer/platform/loader/fetch/data_pipe_bytes_consumer_test.cc

// Copyright 2018 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/platform/loader/fetch/data_pipe_bytes_consumer.h"

#include <string_view>

#include "base/containers/span.h"
#include "base/task/single_thread_task_runner.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/loader/testing/bytes_consumer_test_reader.h"
#include "third_party/blink/renderer/platform/scheduler/test/fake_task_runner.h"

namespace blink {
class DataPipeBytesConsumerTest : public testing::Test {};

TEST_F(DataPipeBytesConsumerTest, TwoPhaseRead) {}

TEST_F(DataPipeBytesConsumerTest, TwoPhaseRead_SignalError) {}

// Verify that both the DataPipe must close and SignalComplete()
// must be called for the DataPipeBytesConsumer to reach the closed
// state.
TEST_F(DataPipeBytesConsumerTest, EndOfPipeBeforeComplete) {}

TEST_F(DataPipeBytesConsumerTest, CompleteBeforeEndOfPipe) {}

// Verify that SignalError moves the DataPipeBytesConsumer to the
// errored state immediately without waiting for the end of the
// DataPipe.
TEST_F(DataPipeBytesConsumerTest, EndOfPipeBeforeError) {}

TEST_F(DataPipeBytesConsumerTest, SignalSizeBeforeRead) {}

TEST_F(DataPipeBytesConsumerTest, SignalExcessSizeBeforeEndOfData) {}

TEST_F(DataPipeBytesConsumerTest, SignalExcessSizeAfterEndOfData) {}

TEST_F(DataPipeBytesConsumerTest, SignalSizeAfterRead) {}

TEST_F(DataPipeBytesConsumerTest, ErrorBeforeEndOfPipe) {}

// Verify that draining the DataPipe and SignalComplete() will
// close the DataPipeBytesConsumer.
TEST_F(DataPipeBytesConsumerTest, DrainPipeBeforeComplete) {}

TEST_F(DataPipeBytesConsumerTest, CompleteBeforeDrainPipe) {}

}  // namespace blink