| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |