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

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

Issue 2100683002: Mojo C++ Bindings: Extract AssociatedGroupController from MultiplexRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops more gyp ugh 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 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"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "mojo/public/cpp/bindings/lib/interface_endpoint_client.h" 15 #include "mojo/public/cpp/bindings/interface_endpoint_client.h"
16 #include "mojo/public/cpp/bindings/message.h" 16 #include "mojo/public/cpp/bindings/message.h"
17 #include "mojo/public/cpp/bindings/message_filter.h" 17 #include "mojo/public/cpp/bindings/message_filter.h"
18 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" 18 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
19 #include "mojo/public/cpp/bindings/tests/message_queue.h" 19 #include "mojo/public/cpp/bindings/tests/message_queue.h"
20 #include "mojo/public/cpp/bindings/tests/router_test_util.h" 20 #include "mojo/public/cpp/bindings/tests/router_test_util.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 namespace mojo { 23 namespace mojo {
24 namespace test { 24 namespace test {
25 namespace { 25 namespace {
26 26
27 using mojo::internal::InterfaceEndpointClient;
28 using mojo::internal::MultiplexRouter; 27 using mojo::internal::MultiplexRouter;
29 28
30 class MultiplexRouterTest : public testing::Test { 29 class MultiplexRouterTest : public testing::Test {
31 public: 30 public:
32 MultiplexRouterTest() {} 31 MultiplexRouterTest() {}
33 32
34 void SetUp() override { 33 void SetUp() override {
35 MessagePipe pipe; 34 MessagePipe pipe;
36 router0_ = new MultiplexRouter(true, std::move(pipe.handle0), 35 router0_ = new MultiplexRouter(true, std::move(pipe.handle0),
37 base::ThreadTaskRunnerHandle::Get()); 36 base::ThreadTaskRunnerHandle::Get());
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 335
337 EXPECT_FALSE(generator.responder_is_valid()); 336 EXPECT_FALSE(generator.responder_is_valid());
338 generator.CompleteWithResponse(); // This should end up doing nothing. 337 generator.CompleteWithResponse(); // This should end up doing nothing.
339 } 338 }
340 339
341 // TODO(yzshen): add more tests. 340 // TODO(yzshen): add more tests.
342 341
343 } // namespace 342 } // namespace
344 } // namespace test 343 } // namespace test
345 } // namespace mojo 344 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698