chromium/extensions/renderer/bindings/api_binding_js_util_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/renderer/bindings/api_binding_js_util.h"

#include <optional>

#include "base/functional/bind.h"
#include "extensions/renderer/bindings/api_binding_test_util.h"
#include "extensions/renderer/bindings/api_bindings_system.h"
#include "extensions/renderer/bindings/api_bindings_system_unittest.h"
#include "extensions/renderer/bindings/api_invocation_errors.h"
#include "gin/arguments.h"
#include "gin/handle.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace extensions {

namespace {

// Calls handleException on |obj|, which is presumed to be the JS binding util.
const char kHandleException[] =;

}  // namespace

class APIBindingJSUtilUnittest : public APIBindingsSystemTest {};

TEST_F(APIBindingJSUtilUnittest, TestSetLastError) {}

TEST_F(APIBindingJSUtilUnittest, TestHasLastError) {}

TEST_F(APIBindingJSUtilUnittest, TestGetLastError) {}

TEST_F(APIBindingJSUtilUnittest, TestRunWithLastError) {}

TEST_F(APIBindingJSUtilUnittest, TestSendRequestWithOptions) {}

// Tests that arguments passed to sendRequest that won't serialize are
// replaced with null. Regression test for https://crbug.com/924045.
TEST_F(APIBindingJSUtilUnittest, TestSendRequestSerializationFailure) {}

TEST_F(APIBindingJSUtilUnittest, TestCallHandleException) {}

TEST_F(APIBindingJSUtilUnittest, TestSetExceptionHandler) {}

TEST_F(APIBindingJSUtilUnittest, TestValidateType) {}

TEST_F(APIBindingJSUtilUnittest, TestValidateCustomSignature) {}

}  // namespace extensions