Index: media/video/capture/screen/screen_capturer_unittest.cc |
diff --git a/remoting/capturer/video_frame_capturer_unittest.cc b/media/video/capture/screen/screen_capturer_unittest.cc |
similarity index 71% |
rename from remoting/capturer/video_frame_capturer_unittest.cc |
rename to media/video/capture/screen/screen_capturer_unittest.cc |
index 72c0022449440a6c34fda8937f2ec431636e6ca0..c46df297c2f5ec40e7200194eb256c21b2f09d17 100644 |
--- a/remoting/capturer/video_frame_capturer_unittest.cc |
+++ b/media/video/capture/screen/screen_capturer_unittest.cc |
@@ -2,22 +2,22 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "remoting/capturer/video_frame_capturer.h" |
+#include "media/video/capture/screen/screen_capturer.h" |
#include "base/bind.h" |
#if defined(OS_MACOSX) |
#include "base/mac/mac_util.h" |
#endif // defined(OS_MACOSX) |
-#include "remoting/capturer/capture_data.h" |
-#include "remoting/capturer/shared_buffer_factory.h" |
-#include "remoting/capturer/video_capturer_mock_objects.h" |
+#include "media/video/capture/screen/screen_capture_data.h" |
+#include "media/video/capture/screen/screen_capturer_mock_objects.h" |
+#include "media/video/capture/screen/shared_buffer_factory.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
using ::testing::_; |
using ::testing::AnyNumber; |
-namespace remoting { |
+namespace media { |
class MockSharedBufferFactory : public SharedBufferFactory { |
public: |
@@ -40,35 +40,35 @@ MATCHER(DirtyRegionIsNonEmptyRect, "") { |
return dirty_region == SkRegion(dirty_region_bounds); |
} |
-class VideoFrameCapturerTest : public testing::Test { |
+class ScreenCapturerTest : public testing::Test { |
public: |
scoped_refptr<SharedBuffer> CreateSharedBuffer(uint32 size); |
protected: |
- scoped_ptr<VideoFrameCapturer> capturer_; |
+ scoped_ptr<ScreenCapturer> capturer_; |
MockSharedBufferFactory shared_buffer_factory_; |
- MockVideoFrameCapturerDelegate delegate_; |
+ MockScreenCapturerDelegate delegate_; |
}; |
-scoped_refptr<SharedBuffer> VideoFrameCapturerTest::CreateSharedBuffer( |
+scoped_refptr<SharedBuffer> ScreenCapturerTest::CreateSharedBuffer( |
uint32 size) { |
return scoped_refptr<SharedBuffer>(new SharedBuffer(size)); |
} |
-TEST_F(VideoFrameCapturerTest, StartCapturer) { |
- capturer_ = VideoFrameCapturer::Create(); |
+TEST_F(ScreenCapturerTest, StartCapturer) { |
+ capturer_ = ScreenCapturer::Create(); |
capturer_->Start(&delegate_); |
capturer_->Stop(); |
} |
-TEST_F(VideoFrameCapturerTest, Capture) { |
+TEST_F(ScreenCapturerTest, Capture) { |
// Assume that Start() treats the screen as invalid initially. |
EXPECT_CALL(delegate_, |
OnCaptureCompleted(DirtyRegionIsNonEmptyRect())); |
EXPECT_CALL(delegate_, OnCursorShapeChangedPtr(_)) |
.Times(AnyNumber()); |
- capturer_ = VideoFrameCapturer::Create(); |
+ capturer_ = ScreenCapturer::Create(); |
capturer_->Start(&delegate_); |
capturer_->CaptureFrame(); |
capturer_->Stop(); |
@@ -76,7 +76,7 @@ TEST_F(VideoFrameCapturerTest, Capture) { |
#if defined(OS_WIN) |
-TEST_F(VideoFrameCapturerTest, UseSharedBuffers) { |
+TEST_F(ScreenCapturerTest, UseSharedBuffers) { |
EXPECT_CALL(delegate_, |
OnCaptureCompleted(DirtyRegionIsNonEmptyRect())); |
EXPECT_CALL(delegate_, OnCursorShapeChangedPtr(_)) |
@@ -84,11 +84,11 @@ TEST_F(VideoFrameCapturerTest, UseSharedBuffers) { |
EXPECT_CALL(shared_buffer_factory_, CreateSharedBuffer(_)) |
.Times(1) |
- .WillOnce(Invoke(this, &VideoFrameCapturerTest::CreateSharedBuffer)); |
+ .WillOnce(Invoke(this, &ScreenCapturerTest::CreateSharedBuffer)); |
EXPECT_CALL(shared_buffer_factory_, ReleaseSharedBuffer(_)) |
.Times(1); |
- capturer_ = VideoFrameCapturer::CreateWithFactory(&shared_buffer_factory_); |
+ capturer_ = ScreenCapturer::CreateWithFactory(&shared_buffer_factory_); |
capturer_->Start(&delegate_); |
capturer_->CaptureFrame(); |
capturer_->Stop(); |
@@ -97,4 +97,4 @@ TEST_F(VideoFrameCapturerTest, UseSharedBuffers) { |
#endif // defined(OS_WIN) |
-} // namespace remoting |
+} // namespace media |