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

Side by Side Diff: mojo/edk/system/channel_test_base.cc

Issue 1367523003: EDK: mostly style fix: change TestIOThread::Mode to an enum class. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/system/data_pipe_impl_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/edk/system/channel_test_base.h" 5 #include "mojo/edk/system/channel_test_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "mojo/edk/embedder/platform_channel_pair.h" 11 #include "mojo/edk/embedder/platform_channel_pair.h"
12 #include "mojo/edk/system/raw_channel.h" 12 #include "mojo/edk/system/raw_channel.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace system { 15 namespace system {
16 namespace test { 16 namespace test {
17 17
18 ChannelTestBase::ChannelTestBase() 18 ChannelTestBase::ChannelTestBase()
19 : io_thread_(mojo::test::TestIOThread::kAutoStart) {} 19 : io_thread_(mojo::test::TestIOThread::StartMode::AUTO) {}
20 20
21 ChannelTestBase::~ChannelTestBase() { 21 ChannelTestBase::~ChannelTestBase() {
22 } 22 }
23 23
24 void ChannelTestBase::SetUp() { 24 void ChannelTestBase::SetUp() {
25 PostMethodToIOThreadAndWait(FROM_HERE, &ChannelTestBase::SetUpOnIOThread); 25 PostMethodToIOThreadAndWait(FROM_HERE, &ChannelTestBase::SetUpOnIOThread);
26 } 26 }
27 27
28 void ChannelTestBase::CreateChannelOnIOThread(unsigned i) { 28 void ChannelTestBase::CreateChannelOnIOThread(unsigned i) {
29 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop()); 29 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop()); 61 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
62 62
63 embedder::PlatformChannelPair channel_pair; 63 embedder::PlatformChannelPair channel_pair;
64 raw_channels_[0] = RawChannel::Create(channel_pair.PassServerHandle()); 64 raw_channels_[0] = RawChannel::Create(channel_pair.PassServerHandle());
65 raw_channels_[1] = RawChannel::Create(channel_pair.PassClientHandle()); 65 raw_channels_[1] = RawChannel::Create(channel_pair.PassClientHandle());
66 } 66 }
67 67
68 } // namespace test 68 } // namespace test
69 } // namespace system 69 } // namespace system
70 } // namespace mojo 70 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698