Chromium Code Reviews| Index: remoting/host/screen_recorder_unittest.cc |
| diff --git a/remoting/host/session_manager_unittest.cc b/remoting/host/screen_recorder_unittest.cc |
| similarity index 89% |
| rename from remoting/host/session_manager_unittest.cc |
| rename to remoting/host/screen_recorder_unittest.cc |
| index 5c853b28b42c4f54207d3ea9c630a28a6e775af2..043daac84e47b84e3a411b5878eba1f344fb9b97 100644 |
| --- a/remoting/host/session_manager_unittest.cc |
| +++ b/remoting/host/screen_recorder_unittest.cc |
| @@ -6,7 +6,7 @@ |
| #include "base/task.h" |
| #include "remoting/base/mock_objects.h" |
| #include "remoting/host/mock_objects.h" |
| -#include "remoting/host/session_manager.h" |
| +#include "remoting/host/screen_recorder.h" |
| #include "remoting/proto/video.pb.h" |
| #include "remoting/protocol/mock_objects.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| @@ -27,34 +27,30 @@ static const media::VideoFrame::Format kFormat = media::VideoFrame::RGB32; |
| static const VideoPacketFormat::Encoding kEncoding = |
| VideoPacketFormat::ENCODING_VERBATIM; |
| -class SessionManagerTest : public testing::Test { |
| +class ScreenRecorderTest : public testing::Test { |
| public: |
| - SessionManagerTest() { |
| + ScreenRecorderTest() { |
| } |
| - protected: |
| - void Init() { |
| + virtual void SetUp() { |
| capturer_ = new MockCapturer(); |
| encoder_ = new MockEncoder(); |
| connection_ = new MockConnectionToClient(); |
| - record_ = new SessionManager( |
| + record_ = new ScreenRecorder( |
| &message_loop_, &message_loop_, &message_loop_, |
| capturer_, encoder_); |
| } |
| - scoped_refptr<SessionManager> record_; |
| + protected: |
| + scoped_refptr<ScreenRecorder> record_; |
| scoped_refptr<MockConnectionToClient> connection_; |
| MockCapturer* capturer_; |
|
dmac
2010/11/17 21:58:19
what's the ownership on these guys? It looks like
Alpha Left Google
2010/11/19 23:19:22
capturer_ and encoder_ are deleted by ScreenRecord
|
| MockEncoder* encoder_; |
| MessageLoop message_loop_; |
| private: |
| - DISALLOW_COPY_AND_ASSIGN(SessionManagerTest); |
| + DISALLOW_COPY_AND_ASSIGN(ScreenRecorderTest); |
| }; |
| -TEST_F(SessionManagerTest, Init) { |
| - Init(); |
| -} |
| - |
| ACTION_P2(RunCallback, rects, data) { |
| InvalidRects& dirty_rects = data->mutable_dirty_rects(); |
| InvalidRects temp_rects; |
| @@ -71,10 +67,7 @@ ACTION_P(FinishEncode, msg) { |
| delete arg2; |
| } |
| -// BUG 57351 |
| -TEST_F(SessionManagerTest, DISABLED_OneRecordCycle) { |
| - Init(); |
| - |
| +TEST_F(ScreenRecorderTest, OneRecordCycle) { |
| InvalidRects update_rects; |
| update_rects.insert(gfx::Rect(0, 0, 10, 10)); |
| DataPlanes planes; |