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

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

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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/union_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/union_unittest.cc b/mojo/public/cpp/bindings/tests/union_unittest.cc
index 312c9c0955bb651caa76c0e258c80990b0469f67..95a2d7fd43bd4dbb322fa1d8483c1036e0495f2a 100644
--- a/mojo/public/cpp/bindings/tests/union_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/union_unittest.cc
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <utility>
#include <vector>
+
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/lib/array_internal.h"
@@ -1224,7 +1226,9 @@ TEST(UnionTest, InterfaceInUnion) {
HandleUnionPtr handle(HandleUnion::New());
handle->set_f_small_cache(ptr.Pass());
- handle->get_f_small_cache()->SetIntValue(10);
+ auto small_cache =
+ SmallCachePtr::Create(std::move(handle->get_f_small_cache()));
+ small_cache->SetIntValue(10);
run_loop.RunUntilIdle();
EXPECT_EQ(10, impl.int_value());
}
@@ -1253,7 +1257,9 @@ TEST(UnionTest, InterfaceInUnionSerialization) {
HandleUnionPtr handle2(HandleUnion::New());
Deserialize_(data, handle2.get());
- handle2->get_f_small_cache()->SetIntValue(10);
+ auto small_cache =
+ SmallCachePtr::Create(std::move(handle2->get_f_small_cache()));
+ small_cache->SetIntValue(10);
run_loop.RunUntilIdle();
EXPECT_EQ(10, impl.int_value());
}

Powered by Google App Engine
This is Rietveld 408576698