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

Unified Diff: mojo/edk/system/remote_data_pipe_impl_unittest.cc

Issue 1365383004: Cleanup: Remove internal two-phase data pipe all-or-none support. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/remote_consumer_data_pipe_impl.cc ('k') | mojo/edk/system/remote_producer_data_pipe_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/remote_data_pipe_impl_unittest.cc
diff --git a/mojo/edk/system/remote_data_pipe_impl_unittest.cc b/mojo/edk/system/remote_data_pipe_impl_unittest.cc
index 6464564397e054ba363b17e069f6a9450bb07f58..23b464fdc1e01d6e23398078acaac5ef03653288 100644
--- a/mojo/edk/system/remote_data_pipe_impl_unittest.cc
+++ b/mojo/edk/system/remote_data_pipe_impl_unittest.cc
@@ -291,11 +291,11 @@ TEST_F(RemoteDataPipeImplTest, SendConsumerDuringTwoPhaseWrite) {
DataPipeConsumerDispatcher::Create();
consumer->Init(dp);
- uint32_t num_bytes = static_cast<uint32_t>(10u * sizeof(int32_t));
void* write_ptr = nullptr;
+ uint32_t num_bytes = 0u;
EXPECT_EQ(MOJO_RESULT_OK,
dp->ProducerBeginWriteData(MakeUserPointer(&write_ptr),
- MakeUserPointer(&num_bytes), false));
+ MakeUserPointer(&num_bytes)));
ASSERT_GE(num_bytes, 1u * sizeof(int32_t));
// Write the consumer to MP 0 (port 0). Wait and receive on MP 1 (port 0).
@@ -401,21 +401,21 @@ TEST_F(RemoteDataPipeImplTest, SendConsumerDuringSecondTwoPhaseWrite) {
DataPipeConsumerDispatcher::Create();
consumer->Init(dp);
- uint32_t num_bytes = static_cast<uint32_t>(10u * sizeof(int32_t));
void* write_ptr = nullptr;
+ uint32_t num_bytes = 0u;
EXPECT_EQ(MOJO_RESULT_OK,
dp->ProducerBeginWriteData(MakeUserPointer(&write_ptr),
- MakeUserPointer(&num_bytes), false));
+ MakeUserPointer(&num_bytes)));
ASSERT_GE(num_bytes, 1u * sizeof(int32_t));
*static_cast<int32_t*>(write_ptr) = 123456;
EXPECT_EQ(MOJO_RESULT_OK, dp->ProducerEndWriteData(
static_cast<uint32_t>(1u * sizeof(int32_t))));
- num_bytes = static_cast<uint32_t>(10u * sizeof(int32_t));
write_ptr = nullptr;
+ num_bytes = 0u;
EXPECT_EQ(MOJO_RESULT_OK,
dp->ProducerBeginWriteData(MakeUserPointer(&write_ptr),
- MakeUserPointer(&num_bytes), false));
+ MakeUserPointer(&num_bytes)));
ASSERT_GE(num_bytes, 1u * sizeof(int32_t));
// Write the consumer to MP 0 (port 0). Wait and receive on MP 1 (port 0).
« no previous file with comments | « mojo/edk/system/remote_consumer_data_pipe_impl.cc ('k') | mojo/edk/system/remote_producer_data_pipe_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698