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

Side by Side Diff: mojo/public/cpp/bindings/tests/interface_ptr_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/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 } 189 }
190 190
191 int64_t integer_; 191 int64_t integer_;
192 base::Closure closure_; 192 base::Closure closure_;
193 }; 193 };
194 194
195 class InterfacePtrTest : public testing::Test { 195 class InterfacePtrTest : public testing::Test {
196 public: 196 public:
197 InterfacePtrTest() {} 197 InterfacePtrTest() {}
198 ~InterfacePtrTest() override { loop_.RunUntilIdle(); } 198 ~InterfacePtrTest() override { base::RunLoop().RunUntilIdle(); }
199 199
200 void PumpMessages() { loop_.RunUntilIdle(); } 200 void PumpMessages() { base::RunLoop().RunUntilIdle(); }
201 201
202 private: 202 private:
203 base::MessageLoop loop_; 203 base::MessageLoop loop_;
204 }; 204 };
205 205
206 void SetFlagAndRunClosure(bool* flag, const base::Closure& closure) { 206 void SetFlagAndRunClosure(bool* flag, const base::Closure& closure) {
207 *flag = true; 207 *flag = true;
208 closure.Run(); 208 closure.Run();
209 } 209 }
210 210
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 bool called = false; 733 bool called = false;
734 base::RunLoop loop; 734 base::RunLoop loop;
735 ptr->Ping(base::Bind(&SetFlagAndRunClosure, &called, loop.QuitClosure())); 735 ptr->Ping(base::Bind(&SetFlagAndRunClosure, &called, loop.QuitClosure()));
736 loop.Run(); 736 loop.Run();
737 EXPECT_TRUE(called); 737 EXPECT_TRUE(called);
738 } 738 }
739 739
740 } // namespace 740 } // namespace
741 } // namespace test 741 } // namespace test
742 } // namespace mojo 742 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/handle_passing_unittest.cc ('k') | mojo/public/cpp/bindings/tests/request_response_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698