Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Unified Diff: mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc

Issue 1397133002: Remove callers of mojo::Array<size_t> constructor in favor of ::New (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc b/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
index b61d3bc57e41482d50bbcbef8eb50b4683d3f132..b2a2516f3fb5ef70cabfa8d0006ac57b3a017c48 100644
--- a/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
@@ -24,9 +24,9 @@ using mojo::internal::ArrayValidateParams;
// Creates an array of arrays of handles (2 X 3) for testing.
Array<Array<ScopedHandle>> CreateTestNestedHandleArray() {
- Array<Array<ScopedHandle>> array(2);
+ auto array = Array<Array<ScopedHandle>>::New(2);
for (size_t i = 0; i < array.size(); ++i) {
- Array<ScopedHandle> nested_array(3);
+ auto nested_array = Array<ScopedHandle>::New(3);
for (size_t j = 0; j < nested_array.size(); ++j) {
MessagePipe pipe;
nested_array[j] = ScopedHandle::From(pipe.handle1.Pass());
@@ -198,7 +198,7 @@ TEST_F(SerializationWarningTest, ArrayOfArraysOfHandles) {
}
TEST_F(SerializationWarningTest, ArrayOfStrings) {
- Array<String> test_array(3);
+ auto test_array = Array<String>::New(3);
for (size_t i = 0; i < test_array.size(); ++i)
test_array[i] = "hello";
@@ -207,14 +207,14 @@ TEST_F(SerializationWarningTest, ArrayOfStrings) {
TestArrayWarning(test_array.Pass(), mojo::internal::VALIDATION_ERROR_NONE,
&validate_params_0);
- test_array = Array<String>(3);
+ test_array = Array<String>::New(3);
ArrayValidateParams validate_params_1(
0, false, new ArrayValidateParams(0, false, nullptr));
TestArrayWarning(test_array.Pass(),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
&validate_params_1);
- test_array = Array<String>(2);
+ test_array = Array<String>::New(2);
ArrayValidateParams validate_params_2(
3, true, new ArrayValidateParams(0, false, nullptr));
TestArrayWarning(test_array.Pass(),
« no previous file with comments | « mojo/public/cpp/bindings/tests/sample_service_unittest.cc ('k') | mojo/public/cpp/bindings/tests/struct_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698