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

Side by Side Diff: blimp/client/core/compositor/blob_manager_unittest.cc

Issue 2300493002: Move glue code of blob channel to blimp_client_context_impl. (Closed)
Patch Set: More polish on comments. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <memory>
6
7 #include "blimp/client/core/compositor/blob_image_serialization_processor.h"
8 #include "blimp/client/core/compositor/blob_manager.h"
9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 using testing::_;
13
14 namespace blimp {
15 namespace client {
16
17 class MockImageDecodeErrorDelegate
18 : public BlobImageSerializationProcessor::ErrorDelegate {
19 MOCK_METHOD0(OnImageDecodeError, void());
20 };
21
22 class MockBlobManager : public BlobManager {
23 public:
24 MockBlobManager() : BlobManager(&mock_delegate) {}
25 ~MockBlobManager() override {}
26
27 BlobChannelReceiver* Receiver() { return blob_receiver_.get(); }
28
29 private:
30 MockImageDecodeErrorDelegate mock_delegate;
31 };
32
33 class BlobManagerTest : public testing::Test {
34 public:
35 BlobManagerTest() {}
36 ~BlobManagerTest() override {}
37
38 private:
39 DISALLOW_COPY_AND_ASSIGN(BlobManagerTest);
40 };
41
42 TEST_F(BlobManagerTest, CheckReceiver) {
43 MockBlobManager blob_manager;
44 // BlobManager wrapper must have the receiver.
45 DCHECK(blob_manager.Receiver());
46 }
47
48 } // namespace client
49 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698