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

Unified Diff: remoting/host/screen_recorder_unittest.cc

Issue 5118002: Rename SessionManager to ScreenRecorder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added comments Created 10 years, 1 month 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: 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..2d4989175f6c8ec543e0f95e74e02e9007d85180 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,32 @@ 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();
dmac 2010/11/19 23:24:24 Could you add the comment about ownership here ins
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_;
+
+ // The following mock objects are owned by ScreenRecorder.
MockCapturer* capturer_;
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 +69,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;

Powered by Google App Engine
This is Rietveld 408576698