chromium/third_party/blink/renderer/core/streams/transform_stream_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/core/streams/transform_stream.h"

#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/iterable.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_gc_controller.h"
#include "third_party/blink/renderer/core/streams/readable_stream.h"
#include "third_party/blink/renderer/core/streams/test_utils.h"
#include "third_party/blink/renderer/core/streams/transform_stream_default_controller.h"
#include "third_party/blink/renderer/core/streams/transform_stream_transformer.h"
#include "third_party/blink/renderer/core/streams/writable_stream.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/v8_binding.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/wtf/text/wtf_string.h"
#include "v8/include/v8.h"

namespace blink {

namespace {

_;
ByMove;
Mock;
Return;

class TransformStreamTest : public ::testing::Test {};

// A convenient base class to make tests shorter. Subclasses need not implement
// both Transform() and Flush(), and can override the void versions to avoid the
// need to create a promise to return. Not appropriate for use in production.
class TestTransformer : public TransformStreamTransformer {};

class IdentityTransformer final : public TestTransformer {};

class MockTransformStreamTransformer : public TransformStreamTransformer {};

// If this doesn't work then nothing else will.
TEST_F(TransformStreamTest, Construct) {}

TEST_F(TransformStreamTest, Accessors) {}

TEST_F(TransformStreamTest, TransformIsCalled) {}

TEST_F(TransformStreamTest, FlushIsCalled) {}

bool IsIteratorForStringMatching(ScriptState* script_state,
                                 ScriptValue value,
                                 const String& expected) {}

bool IsTypeError(ScriptState* script_state,
                 ScriptValue value,
                 const String& message) {}

TEST_F(TransformStreamTest, EnqueueFromTransform) {}

TEST_F(TransformStreamTest, EnqueueFromFlush) {}

TEST_F(TransformStreamTest, ThrowFromTransform) {}

TEST_F(TransformStreamTest, ThrowFromFlush) {}

TEST_F(TransformStreamTest, CreateFromReadableWritablePair) {}

TEST_F(TransformStreamTest, WaitInTransform) {}

TEST_F(TransformStreamTest, WaitInFlush) {}

}  // namespace
}  // namespace blink