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

Unified Diff: blimp/common/logging_unittest.cc

Issue 1970463004: Blimp: Add BlobChannel Helium messages and delegate impls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: haibinlu feedback Created 4 years, 7 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: blimp/common/logging_unittest.cc
diff --git a/blimp/common/logging_unittest.cc b/blimp/common/logging_unittest.cc
index d14f748d64df7c7a4e0e5c357ee97d4b419fe120..7f1cab18e3f65c8728241c318f3e5cc5a815db38 100644
--- a/blimp/common/logging_unittest.cc
+++ b/blimp/common/logging_unittest.cc
@@ -7,8 +7,10 @@
#include "base/at_exit.h"
#include "base/strings/stringprintf.h"
+#include "blimp/common/create_blimp_message.h"
#include "blimp/common/logging.h"
#include "blimp/common/proto/blimp_message.pb.h"
+#include "blimp/common/proto/blob_channel.pb.h"
#include "blimp/net/test_common.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -228,6 +230,19 @@ TEST_F(LoggingTest, RenderWidget) {
deleted_msg);
}
+TEST_F(LoggingTest, BlobChannel) {
+ std::unique_ptr<BlobChannelMessage> blob_message(new BlobChannelMessage);
+ blob_message->set_type(BlobChannelMessage::TRANSFER_BLOB);
+ blob_message->set_blob_id("AAA");
+ blob_message->set_payload("123");
+
+ std::unique_ptr<BlimpMessage> blimp_message =
+ CreateBlimpMessage(std::move(blob_message));
+
+ VerifyLogOutput("type=BLOB_CHANNEL subtype=TRANSFER_BLOB id=\"414141\"",
+ *blimp_message);
+}
+
TEST_F(LoggingTest, Settings) {
BlimpMessage message;
message.set_type(BlimpMessage::SETTINGS);

Powered by Google App Engine
This is Rietveld 408576698