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

Unified Diff: blimp/client/core/compositor/blob_channel_feature_unittest.cc

Issue 2300493002: Move glue code of blob channel to blimp_client_context_impl. (Closed)
Patch Set: Better includes. Created 4 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
Index: blimp/client/core/compositor/blob_channel_feature_unittest.cc
diff --git a/blimp/client/core/compositor/blob_channel_feature_unittest.cc b/blimp/client/core/compositor/blob_channel_feature_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7cad57273a3e79299e22c1facbfd4104ae816950
--- /dev/null
+++ b/blimp/client/core/compositor/blob_channel_feature_unittest.cc
@@ -0,0 +1,50 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <memory>
+
+#include "blimp/client/core/compositor/blob_channel_feature.h"
+#include "blimp/client/core/compositor/blob_image_serialization_processor.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using testing::_;
+
+namespace blimp {
+namespace client {
+
+class MockImageDecodeErrorDelegate
+ : public BlobImageSerializationProcessor::ErrorDelegate {
+ MOCK_METHOD0(OnImageDecodeError, void());
+};
+
+class MockBlobChannelFeature : public BlobChannelFeature {
+ public:
+ MockBlobChannelFeature() : BlobChannelFeature(&mock_delegate) {}
+ ~MockBlobChannelFeature() override {}
David Trainor- moved to gerrit 2016/09/02 16:27:23 = DEFAULT
xingliu 2016/09/02 17:08:31 Done.
+
+ BlobChannelReceiver* Receiver() { return blob_receiver_.get(); }
David Trainor- moved to gerrit 2016/09/02 16:27:23 Receiver -> receiver
xingliu 2016/09/02 17:08:31 Done.
+
+ private:
+ MockImageDecodeErrorDelegate mock_delegate;
+};
+
+class BlobManagerTest : public testing::Test {
+ public:
+ BlobManagerTest() {}
David Trainor- moved to gerrit 2016/09/02 16:27:23 default x 2
xingliu 2016/09/02 17:08:31 Done.
+ ~BlobManagerTest() override {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BlobManagerTest);
+};
+
+TEST_F(BlobManagerTest, CheckReceiver) {
+ MockBlobChannelFeature blob_channel_feature;
+
+ // BlobManager wrapper must have the receiver.
+ DCHECK(blob_channel_feature.Receiver());
+}
+
+} // namespace client
+} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698