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

Side by Side Diff: mojo/public/cpp/bindings/tests/union_unittest.cc

Issue 2104363004: Remove remaining calls to deprecated MessageLoop methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR gab Created 4 years, 5 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 unified diff | Download patch
OLDNEW
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 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 void Echo(PodUnionPtr in, const EchoCallback& callback) override { 1203 void Echo(PodUnionPtr in, const EchoCallback& callback) override {
1204 callback.Run(std::move(in)); 1204 callback.Run(std::move(in));
1205 } 1205 }
1206 }; 1206 };
1207 1207
1208 void ExpectInt16(int16_t value, PodUnionPtr out) { 1208 void ExpectInt16(int16_t value, PodUnionPtr out) {
1209 EXPECT_EQ(value, out->get_f_int16()); 1209 EXPECT_EQ(value, out->get_f_int16());
1210 } 1210 }
1211 1211
1212 TEST(UnionTest, UnionInInterface) { 1212 TEST(UnionTest, UnionInInterface) {
1213 base::MessageLoop run_loop; 1213 base::MessageLoop message_loop;
1214 UnionInterfaceImpl impl; 1214 UnionInterfaceImpl impl;
1215 UnionInterfacePtr ptr; 1215 UnionInterfacePtr ptr;
1216 Binding<UnionInterface> bindings(&impl, GetProxy(&ptr)); 1216 Binding<UnionInterface> bindings(&impl, GetProxy(&ptr));
1217 1217
1218 PodUnionPtr pod(PodUnion::New()); 1218 PodUnionPtr pod(PodUnion::New());
1219 pod->set_f_int16(16); 1219 pod->set_f_int16(16);
1220 1220
1221 ptr->Echo(std::move(pod), base::Bind(&ExpectInt16, 16)); 1221 ptr->Echo(std::move(pod), base::Bind(&ExpectInt16, 16));
1222 run_loop.RunUntilIdle(); 1222 base::RunLoop().RunUntilIdle();
1223 } 1223 }
1224 1224
1225 } // namespace test 1225 } // namespace test
1226 } // namespace mojo 1226 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/sync_method_unittest.cc ('k') | mojo/public/cpp/bindings/tests/validation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698