| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Serialization warnings are only recorded in debug build. | 5 // Serialization warnings are only recorded in debug build. |
| 6 #ifndef NDEBUG | 6 #ifndef NDEBUG |
| 7 | 7 |
| 8 #include "gtest/gtest.h" |
| 8 #include "mojo/public/cpp/bindings/array.h" | 9 #include "mojo/public/cpp/bindings/array.h" |
| 9 #include "mojo/public/cpp/bindings/lib/array_internal.h" | 10 #include "mojo/public/cpp/bindings/lib/array_internal.h" |
| 10 #include "mojo/public/cpp/bindings/lib/array_serialization.h" | 11 #include "mojo/public/cpp/bindings/lib/array_serialization.h" |
| 11 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h" | 12 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h" |
| 12 #include "mojo/public/cpp/bindings/lib/validation_errors.h" | 13 #include "mojo/public/cpp/bindings/lib/validation_errors.h" |
| 13 #include "mojo/public/cpp/bindings/string.h" | 14 #include "mojo/public/cpp/bindings/string.h" |
| 14 #include "mojo/public/cpp/system/message_pipe.h" | 15 #include "mojo/public/cpp/system/message_pipe.h" |
| 15 #include "mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom
.h" | 16 #include "mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom
.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | |
| 17 | 17 |
| 18 namespace mojo { | 18 namespace mojo { |
| 19 namespace test { | 19 namespace test { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 using mojo::internal::ArrayValidateParams; | 22 using mojo::internal::ArrayValidateParams; |
| 23 | 23 |
| 24 // Creates an array of arrays of handles (2 X 3) for testing. | 24 // Creates an array of arrays of handles (2 X 3) for testing. |
| 25 Array<Array<ScopedHandle>> CreateTestNestedHandleArray() { | 25 Array<Array<ScopedHandle>> CreateTestNestedHandleArray() { |
| 26 auto array = Array<Array<ScopedHandle>>::New(2); | 26 auto array = Array<Array<ScopedHandle>>::New(2); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 TestArrayWarning(test_array.Pass(), | 209 TestArrayWarning(test_array.Pass(), |
| 210 mojo::internal::ValidationError::UNEXPECTED_ARRAY_HEADER, | 210 mojo::internal::ValidationError::UNEXPECTED_ARRAY_HEADER, |
| 211 &validate_params_2); | 211 &validate_params_2); |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace | 214 } // namespace |
| 215 } // namespace test | 215 } // namespace test |
| 216 } // namespace mojo | 216 } // namespace mojo |
| 217 | 217 |
| 218 #endif | 218 #endif |
| OLD | NEW |