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

Unified Diff: mojo/system/raw_channel_posix_unittest.cc

Issue 172953003: Mojo: Make MessageInTransit more opaque. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 10 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/system/raw_channel_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/raw_channel_posix_unittest.cc
diff --git a/mojo/system/raw_channel_posix_unittest.cc b/mojo/system/raw_channel_posix_unittest.cc
index e7c180a8f81d941785b79a9f27841d979773d677..75470213f138a76beec3d240c6aab4fa567d0016 100644
--- a/mojo/system/raw_channel_posix_unittest.cc
+++ b/mojo/system/raw_channel_posix_unittest.cc
@@ -67,9 +67,8 @@ bool WriteTestMessageToHandle(const embedder::PlatformHandle& handle,
MessageInTransit* message = MakeTestMessage(num_bytes);
ssize_t write_size = HANDLE_EINTR(
- write(handle.fd, message, message->size_with_header_and_padding()));
- bool result = write_size ==
- static_cast<ssize_t>(message->size_with_header_and_padding());
+ write(handle.fd, message->main_buffer(), message->main_buffer_size()));
+ bool result = write_size == static_cast<ssize_t>(message->main_buffer_size());
message->Destroy();
return result;
}
@@ -159,7 +158,7 @@ class TestMessageReaderAndChecker {
}
// If we've read the whole message....
- if (bytes_.size() >= message->size_with_header_and_padding()) {
+ if (bytes_.size() >= message->main_buffer_size()) {
if (!CheckMessageData(message->data(), message->data_size())) {
LOG(ERROR) << "Incorrect message data.";
return false;
@@ -168,7 +167,7 @@ class TestMessageReaderAndChecker {
// Erase message data.
bytes_.erase(bytes_.begin(),
bytes_.begin() +
- message->size_with_header_and_padding());
+ message->main_buffer_size());
return true;
}
}
« no previous file with comments | « mojo/system/raw_channel_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698