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

Side by Side Diff: mojo/public/cpp/bindings/tests/handle_passing_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 ScopedMessagePipeHandle pipe1_; 150 ScopedMessagePipeHandle pipe1_;
151 Binding<sample::Factory> binding_; 151 Binding<sample::Factory> binding_;
152 }; 152 };
153 153
154 class HandlePassingTest : public testing::Test { 154 class HandlePassingTest : public testing::Test {
155 public: 155 public:
156 HandlePassingTest() {} 156 HandlePassingTest() {}
157 157
158 void TearDown() override { PumpMessages(); } 158 void TearDown() override { PumpMessages(); }
159 159
160 void PumpMessages() { loop_.RunUntilIdle(); } 160 void PumpMessages() { base::RunLoop().RunUntilIdle(); }
161 161
162 private: 162 private:
163 base::MessageLoop loop_; 163 base::MessageLoop loop_;
164 }; 164 };
165 165
166 void DoStuff(bool* got_response, 166 void DoStuff(bool* got_response,
167 std::string* got_text_reply, 167 std::string* got_text_reply,
168 const base::Closure& closure, 168 const base::Closure& closure,
169 sample::ResponsePtr response, 169 sample::ResponsePtr response,
170 String text_reply) { 170 String text_reply) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 run_loop.Run(); 349 run_loop.Run();
350 run_loop2.Run(); 350 run_loop2.Run();
351 351
352 EXPECT_EQ(std::string("object1"), name1); 352 EXPECT_EQ(std::string("object1"), name1);
353 EXPECT_EQ(std::string("object2"), name2); 353 EXPECT_EQ(std::string("object2"), name2);
354 } 354 }
355 355
356 } // namespace 356 } // namespace
357 } // namespace test 357 } // namespace test
358 } // namespace mojo 358 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/binding_unittest.cc ('k') | mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698