Index: remoting/host/video_scheduler_unittest.cc |
diff --git a/remoting/host/video_scheduler_unittest.cc b/remoting/host/video_scheduler_unittest.cc |
index 1126233d2a0f6fdda5faafe9d4f3969df15fc3ec..bb063ea7f328e4067f45181940dde0a58fce1e4c 100644 |
--- a/remoting/host/video_scheduler_unittest.cc |
+++ b/remoting/host/video_scheduler_unittest.cc |
@@ -7,9 +7,9 @@ |
#include "base/bind.h" |
#include "base/message_loop.h" |
#include "base/run_loop.h" |
+#include "media/video/capture/screen/screen_capture_data.h" |
+#include "media/video/capture/screen/screen_capturer_mock_objects.h" |
#include "remoting/base/auto_thread_task_runner.h" |
-#include "remoting/capturer/capture_data.h" |
-#include "remoting/capturer/video_capturer_mock_objects.h" |
#include "remoting/codec/video_encoder.h" |
#include "remoting/proto/video.pb.h" |
#include "remoting/protocol/protocol_mock_objects.h" |
@@ -56,7 +56,7 @@ class MockVideoEncoder : public VideoEncoder { |
virtual ~MockVideoEncoder(); |
MOCK_METHOD3(Encode, void( |
- scoped_refptr<CaptureData> capture_data, |
+ scoped_refptr<media::ScreenCaptureData> capture_data, |
bool key_frame, |
const DataAvailableCallback& data_available_callback)); |
@@ -80,7 +80,7 @@ class VideoSchedulerTest : public testing::Test { |
encoder_ = new MockVideoEncoder(); |
} |
- void StartVideoScheduler(scoped_ptr<VideoFrameCapturer> capturer) { |
+ void StartVideoScheduler(scoped_ptr<media::ScreenCapturer> capturer) { |
scheduler_ = VideoScheduler::Create( |
task_runner_, // Capture |
task_runner_, // Encode |
@@ -107,7 +107,7 @@ class VideoSchedulerTest : public testing::Test { |
// The following mock objects are owned by VideoScheduler. |
MockVideoEncoder* encoder_; |
- scoped_refptr<CaptureData> data_; |
+ scoped_refptr<media::ScreenCaptureData> data_; |
private: |
DISALLOW_COPY_AND_ASSIGN(VideoSchedulerTest); |
@@ -130,14 +130,16 @@ void VideoSchedulerTest::StopVideoScheduler() { |
// VideoScheduler is instructed to come to a complete stop. We expect the stop |
// sequence to be executed successfully. |
TEST_F(VideoSchedulerTest, StartAndStop) { |
- scoped_ptr<MockVideoFrameCapturer> capturer_(new MockVideoFrameCapturer()); |
- Expectation capturer_start = EXPECT_CALL(*capturer_, Start(_)); |
+ scoped_ptr<media::MockScreenCapturer> capturer( |
+ new media::MockScreenCapturer()); |
+ Expectation capturer_start = EXPECT_CALL(*capturer, Start(_)); |
- data_ = new CaptureData(NULL, kWidth * CaptureData::kBytesPerPixel, |
- SkISize::Make(kWidth, kHeight)); |
+ data_ = new media::ScreenCaptureData( |
+ NULL, kWidth * media::ScreenCaptureData::kBytesPerPixel, |
+ SkISize::Make(kWidth, kHeight)); |
// First the capturer is called. |
- Expectation capturer_capture = EXPECT_CALL(*capturer_, CaptureFrame()) |
+ Expectation capturer_capture = EXPECT_CALL(*capturer, CaptureFrame()) |
.After(capturer_start) |
.WillRepeatedly(InvokeWithoutArgs( |
this, &VideoSchedulerTest::GenerateOnCaptureCompleted)); |
@@ -158,11 +160,11 @@ TEST_F(VideoSchedulerTest, StartAndStop) { |
InvokeWithoutArgs(this, &VideoSchedulerTest::StopVideoScheduler))) |
.RetiresOnSaturation(); |
- EXPECT_CALL(*capturer_, Stop()) |
+ EXPECT_CALL(*capturer, Stop()) |
.After(capturer_capture); |
// Start video frame capture. |
- StartVideoScheduler(capturer_.PassAs<VideoFrameCapturer>()); |
+ StartVideoScheduler(capturer.PassAs<media::ScreenCapturer>()); |
task_runner_ = NULL; |
run_loop_.Run(); |