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

#include <math.h>

#include <limits>

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/core/streams/stream_algorithms.h"
#include "third_party/blink/renderer/core/streams/test_utils.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {

namespace {

// Tests in this file are named MiscellaneousOperations* so that it is easy to
// select them with gtest_filter.

v8::MaybeLocal<v8::Value> EmptyExtraArg() {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmNoMethod) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmUndefinedMethod) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmNullMethod) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmThrowingGetter) {}

v8::Local<v8::Value> CreateFromFunctionAndGetResult(
    V8TestingScope* scope,
    const char* function_definition,
    v8::MaybeLocal<v8::Value> extra_arg = v8::MaybeLocal<v8::Value>(),
    int argc = 0,
    v8::Local<v8::Value> argv[] = nullptr) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmReturnsInteger) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmReturnsPromise) {}

bool CreateFromFunctionAndGetSuccess(
    V8TestingScope* scope,
    const char* function_definition,
    v8::MaybeLocal<v8::Value> extra_arg = v8::MaybeLocal<v8::Value>(),
    int argc = 0,
    v8::Local<v8::Value> argv[] = nullptr) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmNoArgs) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmExtraArg) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmPassOneArg) {}

TEST(MiscellaneousOperationsTest, CreateAlgorithmPassBoth) {}

TEST(MiscellaneousOperationsTest, CreateStartAlgorithmNoMethod) {}

TEST(MiscellaneousOperationsTest, CreateStartAlgorithmNullMethod) {}

TEST(MiscellaneousOperationsTest, CreateStartAlgorithmThrowingMethod) {}

TEST(MiscellaneousOperationsTest, CreateStartAlgorithmReturningController) {}

TEST(MiscellaneousOperationsTest, CallOrNoop1NoMethod) {}

TEST(MiscellaneousOperationsTest, CallOrNoop1NullMethod) {}

TEST(MiscellaneousOperationsTest, CallOrNoop1CheckCalled) {}

TEST(MiscellaneousOperationsTest, CallOrNoop1ThrowingMethod) {}

v8::Local<v8::Promise> PromiseCallFromText(V8TestingScope* scope,
                                           const char* function_definition,
                                           const char* object_definition,
                                           int argc,
                                           v8::Local<v8::Value> argv[]) {}

TEST(MiscellaneousOperationsTest, PromiseCalledWithObject) {}

TEST(MiscellaneousOperationsTest, PromiseCallThrowing) {}

TEST(MiscellaneousOperationsTest, PromiseCallRejecting) {}

TEST(MiscellaneousOperationsTest, ValidatePositiveHighWaterMark) {}

TEST(MiscellaneousOperationsTest, ValidateInfiniteHighWaterMark) {}

TEST(MiscellaneousOperationsTest, NegativeHighWaterMarkInvalid) {}

TEST(MiscellaneousOperationsTest, NaNHighWaterMarkInvalid) {}

TEST(MiscellaneousOperationsTest, UndefinedSizeFunction) {}

TEST(MiscellaneousOperationsTest, NullSizeFunction) {}

StrategySizeAlgorithm* IdentitySizeAlgorithm(V8TestingScope* scope) {}

TEST(MiscellaneousOperationsTest, SizeAlgorithmWorks) {}

TEST(MiscellaneousOperationsTest, SizeAlgorithmConvertsToNumber) {}

TEST(MiscellaneousOperationsTest, ThrowingSizeAlgorithm) {}

TEST(MiscellaneousOperationsTest, UnconvertibleSize) {}

TEST(MiscellaneousOperationsTest, PromiseResolve) {}

TEST(MiscellaneousOperationsTest, PromiseResolveWithPromise) {}

TEST(MiscellaneousOperationsTest, PromiseResolveWithUndefined) {}

TEST(MiscellaneousOperationsTest, PromiseReject) {}

}  // namespace

}  // namespace blink