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 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1640 | 1640 |
1641 // Empty again. | 1641 // Empty again. |
1642 num_bytes = ~0u; | 1642 num_bytes = ~0u; |
1643 EXPECT_EQ(MOJO_RESULT_OK, | 1643 EXPECT_EQ(MOJO_RESULT_OK, |
1644 this->ConsumerQueryData(MakeUserPointer(&num_bytes))); | 1644 this->ConsumerQueryData(MakeUserPointer(&num_bytes))); |
1645 EXPECT_EQ(0u, num_bytes); | 1645 EXPECT_EQ(0u, num_bytes); |
1646 | 1646 |
1647 this->ConsumerClose(); | 1647 this->ConsumerClose(); |
1648 } | 1648 } |
1649 | 1649 |
1650 TYPED_TEST(DataPipeImplTest, TwoPhaseAllOrNone) { | 1650 TYPED_TEST(DataPipeImplTest, DISABLED_TwoPhaseAllOrNone) { |
1651 const MojoCreateDataPipeOptions options = { | 1651 const MojoCreateDataPipeOptions options = { |
1652 kSizeOfOptions, // |struct_size|. | 1652 kSizeOfOptions, // |struct_size|. |
1653 MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, // |flags|. | 1653 MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, // |flags|. |
1654 static_cast<uint32_t>(sizeof(int32_t)), // |element_num_bytes|. | 1654 static_cast<uint32_t>(sizeof(int32_t)), // |element_num_bytes|. |
1655 10 * sizeof(int32_t) // |capacity_num_bytes|. | 1655 10 * sizeof(int32_t) // |capacity_num_bytes|. |
1656 }; | 1656 }; |
1657 this->Create(options); | 1657 this->Create(options); |
1658 this->DoTransfer(); | 1658 this->DoTransfer(); |
1659 | 1659 |
1660 Waiter waiter; | 1660 Waiter waiter; |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2390 this->ConsumerQueryData(MakeUserPointer(&num_bytes))); | 2390 this->ConsumerQueryData(MakeUserPointer(&num_bytes))); |
2391 EXPECT_EQ(1u * sizeof(int32_t), num_bytes); | 2391 EXPECT_EQ(1u * sizeof(int32_t), num_bytes); |
2392 | 2392 |
2393 this->ProducerClose(); | 2393 this->ProducerClose(); |
2394 this->ConsumerClose(); | 2394 this->ConsumerClose(); |
2395 } | 2395 } |
2396 | 2396 |
2397 } // namespace | 2397 } // namespace |
2398 } // namespace system | 2398 } // namespace system |
2399 } // namespace mojo | 2399 } // namespace mojo |
OLD | NEW |