| 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 "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 SessionManagerTest() { | 27 SessionManagerTest() { |
| 28 } | 28 } |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 void Init() { | 31 void Init() { |
| 32 capturer_ = new MockCapturer(); | 32 capturer_ = new MockCapturer(); |
| 33 encoder_ = new MockEncoder(); | 33 encoder_ = new MockEncoder(); |
| 34 client_ = new MockClientConnection(); | 34 client_ = new MockClientConnection(); |
| 35 record_ = new SessionManager(&message_loop_, | 35 record_ = new SessionManager(&message_loop_, |
| 36 &message_loop_, | 36 &message_loop_, |
| 37 &message_loop_, | 37 &message_loop_, |
| 38 capturer_, | 38 capturer_, |
| 39 encoder_); | 39 encoder_); |
| 40 } | 40 } |
| 41 | 41 |
| 42 scoped_refptr<SessionManager> record_; | 42 scoped_refptr<SessionManager> record_; |
| 43 scoped_refptr<MockClientConnection> client_; | 43 scoped_refptr<MockClientConnection> client_; |
| 44 MockCapturer* capturer_; | 44 MockCapturer* capturer_; |
| 45 MockEncoder* encoder_; | 45 MockEncoder* encoder_; |
| 46 MessageLoop message_loop_; | 46 MessageLoop message_loop_; |
| 47 private: | 47 private: |
| 48 DISALLOW_COPY_AND_ASSIGN(SessionManagerTest); | 48 DISALLOW_COPY_AND_ASSIGN(SessionManagerTest); |
| 49 }; | 49 }; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // Make sure all tasks are completed. | 124 // Make sure all tasks are completed. |
| 125 message_loop_.RunAllPending(); | 125 message_loop_.RunAllPending(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 // TODO(hclam): Add test for double buffering. | 128 // TODO(hclam): Add test for double buffering. |
| 129 // TODO(hclam): Add test for multiple captures. | 129 // TODO(hclam): Add test for multiple captures. |
| 130 // TODO(hclam): Add test for interruption. | 130 // TODO(hclam): Add test for interruption. |
| 131 | 131 |
| 132 } // namespace remoting | 132 } // namespace remoting |
| OLD | NEW |