chromium/third_party/blink/common/messaging/string_message_codec_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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/public/common/messaging/string_message_codec.h"

#include <string>

#include "base/containers/span.h"
#include "base/functional/overloaded.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/base/big_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "v8/include/v8.h"

namespace blink {
namespace {

WebMessagePayload DecodeWithV8(const TransferableMessage& message) {}

TransferableMessage EncodeWithV8(const WebMessagePayload& message,
                                 const bool transferable = false) {}

void CheckStringEQ(const std::optional<WebMessagePayload>& optional_payload,
                   const std::u16string& str) {}

void CheckVectorEQ(const std::optional<WebMessagePayload>& optional_payload,
                   const std::vector<uint8_t>& buffer) {}

TEST(StringMessageCodecTest, SelfTest_ASCII) {}

TEST(StringMessageCodecTest, SelfTest_Latin1) {}

TEST(StringMessageCodecTest, SelfTest_TwoByte) {}

TEST(StringMessageCodecTest, SelfTest_TwoByteLongEnoughToForcePadding) {}

TEST(StringMessageCodecTest, SelfTest_ArrayBuffer) {}

TEST(StringMessageCodecTest, SelfToV8Test_ASCII) {}

TEST(StringMessageCodecTest, SelfToV8Test_Latin1) {}

TEST(StringMessageCodecTest, SelfToV8Test_TwoByte) {}

TEST(StringMessageCodecTest, SelfToV8Test_TwoByteLongEnoughToForcePadding) {}

TEST(StringMessageCodecTest, SelfToV8Test_ArrayBuffer) {}

TEST(StringMessageCodecTest, V8ToSelfTest_ASCII) {}

TEST(StringMessageCodecTest, V8ToSelfTest_Latin1) {}

TEST(StringMessageCodecTest, V8ToSelfTest_TwoByte) {}

TEST(StringMessageCodecTest, V8ToSelfTest_TwoByteLongEnoughToForcePadding) {}

TEST(StringMessageCodecTest, V8ToSelfTest_ArrayBuffer) {}

TEST(StringMessageCodecTest, V8ToSelfTest_ArrayBuffer_transferrable) {}

TransferableMessage TransferableMessageFromRawData(std::vector<uint8_t> data) {}

TEST(StringMessageCodecTest, Overflow) {}

TEST(StringMessageCodecTest, InvalidDecode) {}

}  // namespace
}  // namespace blink