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

Side by Side Diff: mojo/edk/system/data_pipe_impl_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, 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
« no previous file with comments | « mojo/edk/system/channel_test_base.cc ('k') | mojo/edk/system/ipc_support_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 // This file contains tests that are shared between different implementations of 5 // This file contains tests that are shared between different implementations of
6 // |DataPipeImpl|. 6 // |DataPipeImpl|.
7 7
8 #include "mojo/edk/system/data_pipe_impl.h" 8 #include "mojo/edk/system/data_pipe_impl.h"
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 MOJO_DISALLOW_COPY_AND_ASSIGN(LocalDataPipeImplTestHelper); 218 MOJO_DISALLOW_COPY_AND_ASSIGN(LocalDataPipeImplTestHelper);
219 }; 219 };
220 220
221 // RemoteDataPipeImplTestHelper ------------------------------------------------ 221 // RemoteDataPipeImplTestHelper ------------------------------------------------
222 222
223 // Base class for |Remote{Producer,Consumer}DataPipeImplTestHelper|. 223 // Base class for |Remote{Producer,Consumer}DataPipeImplTestHelper|.
224 class RemoteDataPipeImplTestHelper : public DataPipeImplTestHelper { 224 class RemoteDataPipeImplTestHelper : public DataPipeImplTestHelper {
225 public: 225 public:
226 RemoteDataPipeImplTestHelper() 226 RemoteDataPipeImplTestHelper()
227 : io_thread_(mojo::test::TestIOThread::kAutoStart) {} 227 : io_thread_(mojo::test::TestIOThread::StartMode::AUTO) {}
228 ~RemoteDataPipeImplTestHelper() override {} 228 ~RemoteDataPipeImplTestHelper() override {}
229 229
230 void SetUp() override { 230 void SetUp() override {
231 scoped_refptr<ChannelEndpoint> ep[2]; 231 scoped_refptr<ChannelEndpoint> ep[2];
232 message_pipes_[0] = MessagePipe::CreateLocalProxy(&ep[0]); 232 message_pipes_[0] = MessagePipe::CreateLocalProxy(&ep[0]);
233 message_pipes_[1] = MessagePipe::CreateLocalProxy(&ep[1]); 233 message_pipes_[1] = MessagePipe::CreateLocalProxy(&ep[1]);
234 234
235 io_thread_.PostTaskAndWait( 235 io_thread_.PostTaskAndWait(
236 FROM_HERE, base::Bind(&RemoteDataPipeImplTestHelper::SetUpOnIOThread, 236 FROM_HERE, base::Bind(&RemoteDataPipeImplTestHelper::SetUpOnIOThread,
237 base::Unretained(this), ep[0], ep[1])); 237 base::Unretained(this), ep[0], ep[1]));
(...skipping 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after
2453 test::Sleep(10u); 2453 test::Sleep(10u);
2454 2454
2455 EXPECT_EQ(MOJO_RESULT_OK, this->ConsumerEndReadData(num_bytes)); 2455 EXPECT_EQ(MOJO_RESULT_OK, this->ConsumerEndReadData(num_bytes));
2456 2456
2457 this->ConsumerClose(); 2457 this->ConsumerClose();
2458 } 2458 }
2459 2459
2460 } // namespace 2460 } // namespace
2461 } // namespace system 2461 } // namespace system
2462 } // namespace mojo 2462 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/channel_test_base.cc ('k') | mojo/edk/system/ipc_support_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698