| Index: mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
|
| diff --git a/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc b/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
|
| index 8d9709c6c1c70c51ac2225e7627e8ad21cb73639..9a20cc45a4b7cbea09a0199d03a6022dfd6e96cb 100644
|
| --- a/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
|
| +++ b/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
|
| @@ -106,11 +106,11 @@ void ExpectStringMap(
|
|
|
| } // namespace
|
|
|
| -TEST_F(WTFTypesTest, Serialization_WTFArrayToWTFArray) {
|
| +TEST_F(WTFTypesTest, Serialization_WTFVectorToWTFVector) {
|
| using MojomType = ArrayDataView<StringDataView>;
|
|
|
| - WTFArray<WTF::String> strs = ConstructStringArray();
|
| - auto cloned_strs = strs.Clone();
|
| + WTF::Vector<WTF::String> strs = ConstructStringArray();
|
| + auto cloned_strs = strs;
|
|
|
| mojo::internal::SerializationContext context;
|
| size_t size =
|
| @@ -123,13 +123,13 @@ TEST_F(WTFTypesTest, Serialization_WTFArrayToWTFArray) {
|
| mojo::internal::Serialize<MojomType>(cloned_strs, &buf, &data,
|
| &validate_params, &context);
|
|
|
| - WTFArray<WTF::String> strs2;
|
| + WTF::Vector<WTF::String> strs2;
|
| mojo::internal::Deserialize<MojomType>(data, &strs2, &context);
|
|
|
| - EXPECT_TRUE(strs.Equals(strs2));
|
| + EXPECT_EQ(strs, strs2);
|
| }
|
|
|
| -TEST_F(WTFTypesTest, Serialization_WTFVectorToWTFVector) {
|
| +TEST_F(WTFTypesTest, Serialization_WTFVectorToStlVector) {
|
| using MojomType = ArrayDataView<StringDataView>;
|
|
|
| WTF::Vector<WTF::String> strs = ConstructStringArray();
|
| @@ -146,28 +146,7 @@ TEST_F(WTFTypesTest, Serialization_WTFVectorToWTFVector) {
|
| mojo::internal::Serialize<MojomType>(cloned_strs, &buf, &data,
|
| &validate_params, &context);
|
|
|
| - WTF::Vector<WTF::String> strs2;
|
| - mojo::internal::Deserialize<MojomType>(data, &strs2, &context);
|
| -
|
| - EXPECT_EQ(strs, strs2);
|
| -}
|
| -
|
| -TEST_F(WTFTypesTest, Serialization_WTFArrayToMojoArray) {
|
| - using MojomType = ArrayDataView<StringDataView>;
|
| -
|
| - WTFArray<WTF::String> strs = ConstructStringArray();
|
| -
|
| - mojo::internal::SerializationContext context;
|
| - size_t size = mojo::internal::PrepareToSerialize<MojomType>(strs, &context);
|
| -
|
| - mojo::internal::FixedBufferForTesting buf(size);
|
| - typename mojo::internal::MojomTypeTraits<MojomType>::Data* data;
|
| - mojo::internal::ContainerValidateParams validate_params(
|
| - 0, true, new mojo::internal::ContainerValidateParams(0, false, nullptr));
|
| - mojo::internal::Serialize<MojomType>(strs, &buf, &data, &validate_params,
|
| - &context);
|
| -
|
| - Array<base::Optional<std::string>> strs2;
|
| + std::vector<base::Optional<std::string>> strs2;
|
| mojo::internal::Deserialize<MojomType>(data, &strs2, &context);
|
|
|
| ASSERT_EQ(4u, strs2.size());
|
|
|