OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/task.h" | 6 #include "base/task.h" |
7 #include "remoting/base/mock_objects.h" | 7 #include "remoting/base/mock_objects.h" |
8 #include "remoting/host/mock_objects.h" | 8 #include "remoting/host/mock_objects.h" |
9 #include "remoting/host/session_manager.h" | 9 #include "remoting/host/session_manager.h" |
10 #include "remoting/proto/video.pb.h" | 10 #include "remoting/proto/video.pb.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 class SessionManagerTest : public testing::Test { | 30 class SessionManagerTest : public testing::Test { |
31 public: | 31 public: |
32 SessionManagerTest() { | 32 SessionManagerTest() { |
33 } | 33 } |
34 | 34 |
35 protected: | 35 protected: |
36 void Init() { | 36 void Init() { |
37 capturer_ = new MockCapturer(); | 37 capturer_ = new MockCapturer(); |
38 encoder_ = new MockEncoder(); | 38 encoder_ = new MockEncoder(); |
39 connection_ = new MockConnectionToClient(); | 39 connection_ = new MockConnectionToClient(); |
40 record_ = new SessionManager(&message_loop_, | 40 record_ = new SessionManager( |
41 &message_loop_, | 41 &message_loop_, &message_loop_, &message_loop_, |
42 &message_loop_, | 42 capturer_, encoder_); |
43 capturer_, | |
44 encoder_); | |
45 } | 43 } |
46 | 44 |
47 scoped_refptr<SessionManager> record_; | 45 scoped_refptr<SessionManager> record_; |
48 scoped_refptr<MockConnectionToClient> connection_; | 46 scoped_refptr<MockConnectionToClient> connection_; |
49 MockCapturer* capturer_; | 47 MockCapturer* capturer_; |
50 MockEncoder* encoder_; | 48 MockEncoder* encoder_; |
51 MessageLoop message_loop_; | 49 MessageLoop message_loop_; |
52 private: | 50 private: |
53 DISALLOW_COPY_AND_ASSIGN(SessionManagerTest); | 51 DISALLOW_COPY_AND_ASSIGN(SessionManagerTest); |
54 }; | 52 }; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 112 |
115 // Make sure all tasks are completed. | 113 // Make sure all tasks are completed. |
116 message_loop_.RunAllPending(); | 114 message_loop_.RunAllPending(); |
117 } | 115 } |
118 | 116 |
119 // TODO(hclam): Add test for double buffering. | 117 // TODO(hclam): Add test for double buffering. |
120 // TODO(hclam): Add test for multiple captures. | 118 // TODO(hclam): Add test for multiple captures. |
121 // TODO(hclam): Add test for interruption. | 119 // TODO(hclam): Add test for interruption. |
122 | 120 |
123 } // namespace remoting | 121 } // namespace remoting |
OLD | NEW |