#include "third_party/blink/renderer/core/streams/readable_stream.h"
#include <optional>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_tester.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.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/bindings/core/v8/v8_readable_stream.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_readable_stream_get_reader_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_readablestreambyobreader_readablestreamdefaultreader.h"
#include "third_party/blink/renderer/core/messaging/message_channel.h"
#include "third_party/blink/renderer/core/streams/readable_stream_byob_reader.h"
#include "third_party/blink/renderer/core/streams/readable_stream_default_controller_with_script_scope.h"
#include "third_party/blink/renderer/core/streams/readable_stream_default_reader.h"
#include "third_party/blink/renderer/core/streams/readable_stream_transferring_optimizer.h"
#include "third_party/blink/renderer/core/streams/test_underlying_source.h"
#include "third_party/blink/renderer/core/streams/test_utils.h"
#include "third_party/blink/renderer/core/streams/underlying_byte_source_base.h"
#include "third_party/blink/renderer/core/streams/underlying_source_base.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/bindings/string_resource.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 {
_;
ByMove;
Mock;
Return;
class ReadableStreamTest : public testing::Test { … };
class TestTransferringOptimizer final
: public ReadableStreamTransferringOptimizer { … };
TEST_F(ReadableStreamTest, CreateWithoutArguments) { … }
TEST_F(ReadableStreamTest, CreateWithUnderlyingSourceOnly) { … }
TEST_F(ReadableStreamTest, CreateWithFullArguments) { … }
TEST_F(ReadableStreamTest, CreateWithPathologicalStrategy) { … }
TEST_F(ReadableStreamTest, GetReader) { … }
TEST_F(ReadableStreamTest, TypeStringEquality) { … }
TEST_F(ReadableStreamTest, GetBYOBReader) { … }
TEST_F(ReadableStreamTest, Cancel) { … }
TEST_F(ReadableStreamTest, CancelWithNull) { … }
TEST_F(ReadableStreamTest, Tee) { … }
TEST_F(ReadableStreamTest, Close) { … }
TEST_F(ReadableStreamTest, CloseStream) { … }
TEST_F(ReadableStreamTest, Error) { … }
TEST_F(ReadableStreamTest, LockAndDisturb) { … }
TEST_F(ReadableStreamTest, Serialize) { … }
TEST_F(ReadableStreamTest, DeserializeWithNullOptimizer) { … }
TEST_F(ReadableStreamTest, DeserializeWithTestOptimizer) { … }
TEST_F(ReadableStreamTest, GarbageCollectJavaScriptUnderlyingSource) { … }
TEST_F(ReadableStreamTest, GarbageCollectCPlusPlusUnderlyingSource) { … }
class ReadableByteStreamTest : public testing::Test { … };
class TestUnderlyingByteSource : public UnderlyingByteSourceBase { … };
class MockUnderlyingByteSource : public UnderlyingByteSourceBase { … };
TEST_F(ReadableByteStreamTest, Construct) { … }
TEST_F(ReadableByteStreamTest, PullIsCalled) { … }
TEST_F(ReadableByteStreamTest, CancelIsCalled) { … }
bool IsTypeError(ScriptState* script_state,
ScriptValue value,
const String& message) { … }
TEST_F(ReadableByteStreamTest, ThrowFromPull) { … }
TEST_F(ReadableByteStreamTest, ThrowFromCancel) { … }
TEST_F(ReadableByteStreamTest, CloseStream) { … }
}
}