#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/fetch/readable_stream_bytes_consumer.h"
#include <memory>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/core/fetch/bytes_consumer_test_util.h"
#include "third_party/blink/renderer/core/streams/readable_stream.h"
#include "third_party/blink/renderer/core/streams/test_underlying_source.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding_macros.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "v8/include/v8.h"
namespace blink {
namespace {
InSequence;
StrictMock;
Checkpoint;
Result;
PublicState;
class MockClient : public GarbageCollected<MockClient>,
public BytesConsumer::Client { … };
TEST(ReadableStreamBytesConsumerTest, Create) { … }
TEST(ReadableStreamBytesConsumerTest, EmptyStream) { … }
TEST(ReadableStreamBytesConsumerTest, ErroredStream) { … }
TEST(ReadableStreamBytesConsumerTest, TwoPhaseRead) { … }
TEST(ReadableStreamBytesConsumerTest, TwoPhaseReadDetachedDuringRead) { … }
TEST(ReadableStreamBytesConsumerTest, TwoPhaseReadDetachedBetweenReads) { … }
TEST(ReadableStreamBytesConsumerTest, EnqueueUndefined) { … }
TEST(ReadableStreamBytesConsumerTest, EnqueueNull) { … }
TEST(ReadableStreamBytesConsumerTest, EnqueueString) { … }
TEST(ReadableStreamBytesConsumerTest, Cancel) { … }
}
}