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

Side by Side Diff: mojo/edk/system/raw_channel_unittest.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
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/raw_channel.h" 5 #include "mojo/edk/system/raw_channel.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 size_t write_size = 0; 66 size_t write_size = 0;
67 mojo::test::BlockingWrite(handle, message->main_buffer(), 67 mojo::test::BlockingWrite(handle, message->main_buffer(),
68 message->main_buffer_size(), &write_size); 68 message->main_buffer_size(), &write_size);
69 return write_size == message->main_buffer_size(); 69 return write_size == message->main_buffer_size();
70 } 70 }
71 71
72 // ----------------------------------------------------------------------------- 72 // -----------------------------------------------------------------------------
73 73
74 class RawChannelTest : public testing::Test { 74 class RawChannelTest : public testing::Test {
75 public: 75 public:
76 RawChannelTest() : io_thread_(mojo::test::TestIOThread::kManualStart) {} 76 RawChannelTest() : io_thread_(mojo::test::TestIOThread::StartMode::MANUAL) {}
77 ~RawChannelTest() override {} 77 ~RawChannelTest() override {}
78 78
79 void SetUp() override { 79 void SetUp() override {
80 embedder::PlatformChannelPair channel_pair; 80 embedder::PlatformChannelPair channel_pair;
81 handles[0] = channel_pair.PassServerHandle(); 81 handles[0] = channel_pair.PassServerHandle();
82 handles[1] = channel_pair.PassClientHandle(); 82 handles[1] = channel_pair.PassClientHandle();
83 io_thread_.Start(); 83 io_thread_.Start();
84 } 84 }
85 85
86 void TearDown() override { 86 void TearDown() override {
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 FROM_HERE, 838 FROM_HERE,
839 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_read.get()))); 839 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_read.get())));
840 io_thread()->PostTaskAndWait( 840 io_thread()->PostTaskAndWait(
841 FROM_HERE, 841 FROM_HERE,
842 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_write.get()))); 842 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_write.get())));
843 } 843 }
844 844
845 } // namespace 845 } // namespace
846 } // namespace system 846 } // namespace system
847 } // namespace mojo 847 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe_test_utils.cc ('k') | mojo/edk/system/remote_data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698