#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/lib/message_fragment.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/tests/variant_test_util.h"
#include "mojo/public/interfaces/bindings/tests/test_wtf_types.mojom-blink.h"
#include "mojo/public/interfaces/bindings/tests/test_wtf_types.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
namespace mojo {
namespace test {
namespace {
const char kHelloWorld[] = …;
const char kUTF8HelloWorld[] = …;
class TestWTFImpl : public TestWTF { … };
class WTFTypesTest : public testing::Test { … };
WTF::Vector<WTF::String> ConstructStringArray() { … }
WTF::HashMap<WTF::String, WTF::String> ConstructStringMap() { … }
void ExpectString(const WTF::String& expected_string,
base::OnceClosure closure,
const WTF::String& string) { … }
void ExpectStringArray(std::optional<WTF::Vector<WTF::String>>* expected_arr,
base::OnceClosure closure,
const std::optional<WTF::Vector<WTF::String>>& arr) { … }
void ExpectStringMap(
std::optional<WTF::HashMap<WTF::String, WTF::String>>* expected_map,
base::OnceClosure closure,
const std::optional<WTF::HashMap<WTF::String, WTF::String>>& map) { … }
}
TEST_F(WTFTypesTest, Serialization_WTFVectorToWTFVector) { … }
TEST_F(WTFTypesTest, Serialization_WTFVectorInlineCapacity) { … }
TEST_F(WTFTypesTest, Serialization_WTFVectorToStlVector) { … }
TEST_F(WTFTypesTest, Serialization_PublicAPI) { … }
TEST_F(WTFTypesTest, SendString) { … }
TEST_F(WTFTypesTest, SendStringArray) { … }
TEST_F(WTFTypesTest, SendStringMap) { … }
TEST_F(WTFTypesTest, NestedStruct_CloneAndEquals) { … }
}
}