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

Unified Diff: components/cryptauth/wire_message_unittest.cc

Issue 2849493002: [EasyUnlock] Fixing the setup connection finder and message format. (Closed)
Patch Set: Using the right UUID Created 3 years, 8 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: components/cryptauth/wire_message_unittest.cc
diff --git a/components/cryptauth/wire_message_unittest.cc b/components/cryptauth/wire_message_unittest.cc
index 7c7caca35242187bb00dcdf0251c9f19bdc578bb..582c5a3562ecac039bc0667130335be648583b67 100644
--- a/components/cryptauth/wire_message_unittest.cc
+++ b/components/cryptauth/wire_message_unittest.cc
@@ -88,14 +88,15 @@ TEST(CryptAuthWireMessageTest, Deserialize_BodyIsNotADictionary) {
EXPECT_FALSE(message);
}
-TEST(CryptAuthWireMessageTest, Deserialize_BodyLacksPayload) {
+TEST(CryptAuthWireMessageTest, Deserialize_NonEncryptedMessage) {
bool is_incomplete;
std::string header("\3\0\x02", 3);
std::string bytes = header + "{}";
std::unique_ptr<WireMessage> message =
WireMessage::Deserialize(bytes, &is_incomplete);
EXPECT_FALSE(is_incomplete);
- EXPECT_FALSE(message);
+ ASSERT_TRUE(message);
+ EXPECT_EQ("{}", message->body());
}
TEST(CryptAuthWireMessageTest, Deserialize_BodyHasEmptyPayload) {

Powered by Google App Engine
This is Rietveld 408576698