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

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

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup 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 side-by-side diff with in-line comments
Download patch
Index: mojo/edk/system/message_in_transit_test_utils.cc
diff --git a/third_party/mojo/src/mojo/edk/system/message_in_transit_test_utils.cc b/mojo/edk/system/message_in_transit_test_utils.cc
similarity index 59%
copy from third_party/mojo/src/mojo/edk/system/message_in_transit_test_utils.cc
copy to mojo/edk/system/message_in_transit_test_utils.cc
index 1a205b4d5a772a9490a0a23ce7a4bce7ca0251cd..8013626de639edacfd7228803cde1cbb72f69dbd 100644
--- a/third_party/mojo/src/mojo/edk/system/message_in_transit_test_utils.cc
+++ b/mojo/edk/system/message_in_transit_test_utils.cc
@@ -2,33 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "third_party/mojo/src/mojo/edk/system/message_in_transit_test_utils.h"
+#include "mojo/edk/system/message_in_transit_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
-namespace system {
+namespace edk {
namespace test {
scoped_ptr<MessageInTransit> MakeTestMessage(unsigned id) {
return make_scoped_ptr(
- new MessageInTransit(MessageInTransit::Type::ENDPOINT_CLIENT,
- MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA,
+ new MessageInTransit(MessageInTransit::Type::MESSAGE,
static_cast<uint32_t>(sizeof(id)), &id));
}
void VerifyTestMessage(const MessageInTransit* message, unsigned id) {
ASSERT_TRUE(message);
- EXPECT_EQ(MessageInTransit::Type::ENDPOINT_CLIENT, message->type());
- EXPECT_EQ(MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA,
- message->subtype());
+ EXPECT_EQ(MessageInTransit::Type::MESSAGE, message->type());
EXPECT_EQ(sizeof(id), message->num_bytes());
EXPECT_EQ(id, *static_cast<const unsigned*>(message->bytes()));
}
bool IsTestMessage(MessageInTransit* message, unsigned* id) {
- if (message->type() != MessageInTransit::Type::ENDPOINT_CLIENT ||
- message->subtype() != MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA ||
+ if (message->type() != MessageInTransit::Type::MESSAGE ||
message->num_bytes() != sizeof(*id))
return false;
@@ -37,5 +33,5 @@ bool IsTestMessage(MessageInTransit* message, unsigned* id) {
}
} // namespace test
-} // namespace system
+} // namespace edk
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698