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

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

Issue 2090603002: Remove calls to deprecated MessageLoop methods in mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/tests/router_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/public/cpp/bindings/lib/multiplex_router.h" 5 #include "mojo/public/cpp/bindings/lib/multiplex_router.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 26 matching lines...) Expand all
37 base::ThreadTaskRunnerHandle::Get()); 37 base::ThreadTaskRunnerHandle::Get());
38 router1_ = new MultiplexRouter(true, std::move(pipe.handle1), 38 router1_ = new MultiplexRouter(true, std::move(pipe.handle1),
39 base::ThreadTaskRunnerHandle::Get()); 39 base::ThreadTaskRunnerHandle::Get());
40 router0_->CreateEndpointHandlePair(&endpoint0_, &endpoint1_); 40 router0_->CreateEndpointHandlePair(&endpoint0_, &endpoint1_);
41 endpoint1_ = 41 endpoint1_ =
42 EmulatePassingEndpointHandle(std::move(endpoint1_), router1_.get()); 42 EmulatePassingEndpointHandle(std::move(endpoint1_), router1_.get());
43 } 43 }
44 44
45 void TearDown() override {} 45 void TearDown() override {}
46 46
47 void PumpMessages() { loop_.RunUntilIdle(); } 47 void PumpMessages() { base::RunLoop().RunUntilIdle(); }
48 48
49 ScopedInterfaceEndpointHandle EmulatePassingEndpointHandle( 49 ScopedInterfaceEndpointHandle EmulatePassingEndpointHandle(
50 ScopedInterfaceEndpointHandle handle, 50 ScopedInterfaceEndpointHandle handle,
51 MultiplexRouter* target) { 51 MultiplexRouter* target) {
52 CHECK(!handle.is_local()); 52 CHECK(!handle.is_local());
53 53
54 return target->CreateLocalEndpointHandle(handle.release()); 54 return target->CreateLocalEndpointHandle(handle.release());
55 } 55 }
56 56
57 protected: 57 protected:
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 336
337 EXPECT_FALSE(generator.responder_is_valid()); 337 EXPECT_FALSE(generator.responder_is_valid());
338 generator.CompleteWithResponse(); // This should end up doing nothing. 338 generator.CompleteWithResponse(); // This should end up doing nothing.
339 } 339 }
340 340
341 // TODO(yzshen): add more tests. 341 // TODO(yzshen): add more tests.
342 342
343 } // namespace 343 } // namespace
344 } // namespace test 344 } // namespace test
345 } // namespace mojo 345 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/tests/router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698