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

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

Issue 670743002: Mojo: Fixes to current virtual/override style in mojo/edk/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.h" 5 #include "mojo/edk/system/channel.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/test/test_io_thread.h" 10 #include "base/test/test_io_thread.h"
(...skipping 15 matching lines...) Expand all
26 26
27 Tristate BoolToTristate(bool b) { 27 Tristate BoolToTristate(bool b) {
28 return b ? TRISTATE_TRUE : TRISTATE_FALSE; 28 return b ? TRISTATE_TRUE : TRISTATE_FALSE;
29 } 29 }
30 30
31 class ChannelTest : public testing::Test { 31 class ChannelTest : public testing::Test {
32 public: 32 public:
33 ChannelTest() 33 ChannelTest()
34 : io_thread_(base::TestIOThread::kAutoStart), 34 : io_thread_(base::TestIOThread::kAutoStart),
35 init_result_(TRISTATE_UNKNOWN) {} 35 init_result_(TRISTATE_UNKNOWN) {}
36 virtual ~ChannelTest() {} 36 ~ChannelTest() override {}
37 37
38 virtual void SetUp() override { 38 void SetUp() override {
39 io_thread_.PostTaskAndWait( 39 io_thread_.PostTaskAndWait(
40 FROM_HERE, 40 FROM_HERE,
41 base::Bind(&ChannelTest::SetUpOnIOThread, base::Unretained(this))); 41 base::Bind(&ChannelTest::SetUpOnIOThread, base::Unretained(this)));
42 } 42 }
43 43
44 void CreateChannelOnIOThread() { 44 void CreateChannelOnIOThread() {
45 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop()); 45 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
46 channel_ = new Channel(&platform_support_); 46 channel_ = new Channel(&platform_support_);
47 } 47 }
48 48
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 mp->Close(0); 297 mp->Close(0);
298 298
299 EXPECT_TRUE(channel()->HasOneRef()); 299 EXPECT_TRUE(channel()->HasOneRef());
300 } 300 }
301 301
302 // TODO(vtl): More. ------------------------------------------------------------ 302 // TODO(vtl): More. ------------------------------------------------------------
303 303
304 } // namespace 304 } // namespace
305 } // namespace system 305 } // namespace system
306 } // namespace mojo 306 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/embedder/platform_channel_pair_posix_unittest.cc ('k') | mojo/edk/system/core_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698