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 73% |
rename from remoting/capturer/video_frame_capturer_unittest.cc |
rename to media/video/capture/screen/screen_capturer_unittest.cc |
index 11f71f520d2d37ee108321713c1a90d68905e3a4..be087493be821122c242db37977ef1d2f26b5d52 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,23 +40,23 @@ 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(); |
} |
@@ -67,14 +67,14 @@ TEST_F(VideoFrameCapturerTest, StartCapturer) { |
#else |
#define MAYBE_Capture Capture |
#endif |
-TEST_F(VideoFrameCapturerTest, MAYBE_Capture) { |
+TEST_F(ScreenCapturerTest, MAYBE_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(); |
@@ -82,7 +82,7 @@ TEST_F(VideoFrameCapturerTest, MAYBE_Capture) { |
#if defined(OS_WIN) |
-TEST_F(VideoFrameCapturerTest, UseSharedBuffers) { |
+TEST_F(ScreenCapturerTest, UseSharedBuffers) { |
EXPECT_CALL(delegate_, |
OnCaptureCompleted(DirtyRegionIsNonEmptyRect())); |
EXPECT_CALL(delegate_, OnCursorShapeChangedPtr(_)) |
@@ -90,11 +90,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(); |
@@ -103,4 +103,4 @@ TEST_F(VideoFrameCapturerTest, UseSharedBuffers) { |
#endif // defined(OS_WIN) |
-} // namespace remoting |
+} // namespace media |