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

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: fix build 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 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 void Echo(PodUnionPtr in, const EchoCallback& callback) override { 1242 void Echo(PodUnionPtr in, const EchoCallback& callback) override {
1243 callback.Run(std::move(in)); 1243 callback.Run(std::move(in));
1244 } 1244 }
1245 }; 1245 };
1246 1246
1247 void ExpectInt16(int16_t value, PodUnionPtr out) { 1247 void ExpectInt16(int16_t value, PodUnionPtr out) {
1248 EXPECT_EQ(value, out->get_f_int16()); 1248 EXPECT_EQ(value, out->get_f_int16());
1249 } 1249 }
1250 1250
1251 TEST(UnionTest, UnionInInterface) { 1251 TEST(UnionTest, UnionInInterface) {
1252 base::MessageLoop run_loop; 1252 base::MessageLoop run_loop;
gab 2016/06/30 20:28:18 Rename this to |message_loop|, the name was alread
fdoray 2016/07/04 13:59:46 Done.
1253 UnionInterfaceImpl impl; 1253 UnionInterfaceImpl impl;
1254 UnionInterfacePtr ptr; 1254 UnionInterfacePtr ptr;
1255 Binding<UnionInterface> bindings(&impl, GetProxy(&ptr)); 1255 Binding<UnionInterface> bindings(&impl, GetProxy(&ptr));
1256 1256
1257 PodUnionPtr pod(PodUnion::New()); 1257 PodUnionPtr pod(PodUnion::New());
1258 pod->set_f_int16(16); 1258 pod->set_f_int16(16);
1259 1259
1260 ptr->Echo(std::move(pod), base::Bind(&ExpectInt16, 16)); 1260 ptr->Echo(std::move(pod), base::Bind(&ExpectInt16, 16));
1261 run_loop.RunUntilIdle(); 1261 base::RunLoop().RunUntilIdle();
1262 } 1262 }
1263 1263
1264 } // namespace test 1264 } // namespace test
1265 } // namespace mojo 1265 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698