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

Side by Side Diff: mojo/edk/system/remote_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
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 tests both |RemoteProducerDataPipeImpl| and 5 // This file tests both |RemoteProducerDataPipeImpl| and
6 // |RemoteConsumerDataPipeImpl|. 6 // |RemoteConsumerDataPipeImpl|.
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 19 matching lines...) Expand all
30 namespace mojo { 30 namespace mojo {
31 namespace system { 31 namespace system {
32 namespace { 32 namespace {
33 33
34 const MojoHandleSignals kAllSignals = MOJO_HANDLE_SIGNAL_READABLE | 34 const MojoHandleSignals kAllSignals = MOJO_HANDLE_SIGNAL_READABLE |
35 MOJO_HANDLE_SIGNAL_WRITABLE | 35 MOJO_HANDLE_SIGNAL_WRITABLE |
36 MOJO_HANDLE_SIGNAL_PEER_CLOSED; 36 MOJO_HANDLE_SIGNAL_PEER_CLOSED;
37 37
38 class RemoteDataPipeImplTest : public testing::Test { 38 class RemoteDataPipeImplTest : public testing::Test {
39 public: 39 public:
40 RemoteDataPipeImplTest() : io_thread_(mojo::test::TestIOThread::kAutoStart) {} 40 RemoteDataPipeImplTest()
41 : io_thread_(mojo::test::TestIOThread::StartMode::AUTO) {}
41 ~RemoteDataPipeImplTest() override {} 42 ~RemoteDataPipeImplTest() override {}
42 43
43 void SetUp() override { 44 void SetUp() override {
44 scoped_refptr<ChannelEndpoint> ep[2]; 45 scoped_refptr<ChannelEndpoint> ep[2];
45 message_pipes_[0] = MessagePipe::CreateLocalProxy(&ep[0]); 46 message_pipes_[0] = MessagePipe::CreateLocalProxy(&ep[0]);
46 message_pipes_[1] = MessagePipe::CreateLocalProxy(&ep[1]); 47 message_pipes_[1] = MessagePipe::CreateLocalProxy(&ep[1]);
47 48
48 io_thread_.PostTaskAndWait( 49 io_thread_.PostTaskAndWait(
49 FROM_HERE, base::Bind(&RemoteDataPipeImplTest::SetUpOnIOThread, 50 FROM_HERE, base::Bind(&RemoteDataPipeImplTest::SetUpOnIOThread,
50 base::Unretained(this), ep[0], ep[1])); 51 base::Unretained(this), ep[0], ep[1]));
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 EXPECT_EQ(123456, elements[0]); 501 EXPECT_EQ(123456, elements[0]);
501 EXPECT_EQ(789012, elements[1]); 502 EXPECT_EQ(789012, elements[1]);
502 EXPECT_EQ(0, elements[2]); 503 EXPECT_EQ(0, elements[2]);
503 504
504 consumer->Close(); 505 consumer->Close();
505 } 506 }
506 507
507 } // namespace 508 } // namespace
508 } // namespace system 509 } // namespace system
509 } // namespace mojo 510 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/raw_channel_unittest.cc ('k') | mojo/edk/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698