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

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

Issue 2062333002: mojo::Callback -> base::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 ed61524fd3ac82854b64bc50b0110ec23fd10fe1..a30bf847f0d0604ac491d01b63be5c113e286fa3 100644
--- a/mojo/public/cpp/bindings/tests/union_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/union_unittest.cc
@@ -1238,6 +1238,10 @@ class UnionInterfaceImpl : public UnionInterface {
}
};
+void ExpectInt16(int16_t value, PodUnionPtr out) {
+ EXPECT_EQ(value, out->get_f_int16());
+}
+
TEST(UnionTest, UnionInInterface) {
base::MessageLoop run_loop;
UnionInterfaceImpl impl;
@@ -1247,8 +1251,7 @@ TEST(UnionTest, UnionInInterface) {
PodUnionPtr pod(PodUnion::New());
pod->set_f_int16(16);
- ptr->Echo(std::move(pod),
- [](PodUnionPtr out) { EXPECT_EQ(16, out->get_f_int16()); });
+ ptr->Echo(std::move(pod), base::Bind(&ExpectInt16, 16));
run_loop.RunUntilIdle();
}

Powered by Google App Engine
This is Rietveld 408576698