Index: media/video/capture/screen/screen_capturer_mac_unittest.cc |
diff --git a/remoting/capturer/video_frame_capturer_mac_unittest.cc b/media/video/capture/screen/screen_capturer_mac_unittest.cc |
similarity index 74% |
rename from remoting/capturer/video_frame_capturer_mac_unittest.cc |
rename to media/video/capture/screen/screen_capturer_mac_unittest.cc |
index 12435b3e0e506d37f67f6bb130922d7d6a4b9392..a62d40b393607f3b0aaffc352f108b374ccf67c9 100644 |
--- a/remoting/capturer/video_frame_capturer_mac_unittest.cc |
+++ b/media/video/capture/screen/screen_capturer_mac_unittest.cc |
@@ -2,7 +2,7 @@ |
// 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 <ApplicationServices/ApplicationServices.h> |
@@ -11,14 +11,14 @@ |
#include "base/bind.h" |
#include "base/callback.h" |
#include "base/memory/scoped_ptr.h" |
-#include "remoting/capturer/capture_data.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 "testing/gtest/include/gtest/gtest.h" |
using ::testing::_; |
using ::testing::AnyNumber; |
-namespace remoting { |
+namespace media { |
// Verify that the OS is at least Snow Leopard (10.6). |
// Chromoting doesn't support 10.5 or earlier. |
@@ -29,18 +29,18 @@ bool CheckSnowLeopard() { |
return majorVersion == 10 && minorVersion > 5; |
} |
-class VideoFrameCapturerMacTest : public testing::Test { |
+class ScreenCapturerMacTest : public testing::Test { |
public: |
// Verifies that the whole screen is initially dirty. |
- void CaptureDoneCallback1(scoped_refptr<CaptureData> capture_data); |
+ void CaptureDoneCallback1(scoped_refptr<ScreenCaptureData> capture_data); |
// Verifies that a rectangle explicitly marked as dirty is propagated |
// correctly. |
- void CaptureDoneCallback2(scoped_refptr<CaptureData> capture_data); |
+ void CaptureDoneCallback2(scoped_refptr<ScreenCaptureData> capture_data); |
protected: |
virtual void SetUp() OVERRIDE { |
- capturer_ = VideoFrameCapturer::Create(); |
+ capturer_ = ScreenCapturer::Create(); |
} |
void AddDirtyRect() { |
@@ -48,13 +48,13 @@ class VideoFrameCapturerMacTest : public testing::Test { |
region_.op(rect, SkRegion::kUnion_Op); |
} |
- scoped_ptr<VideoFrameCapturer> capturer_; |
- MockVideoFrameCapturerDelegate delegate_; |
+ scoped_ptr<ScreenCapturer> capturer_; |
+ MockScreenCapturerDelegate delegate_; |
SkRegion region_; |
}; |
-void VideoFrameCapturerMacTest::CaptureDoneCallback1( |
- scoped_refptr<CaptureData> capture_data) { |
+void ScreenCapturerMacTest::CaptureDoneCallback1( |
+ scoped_refptr<ScreenCaptureData> capture_data) { |
CGDirectDisplayID mainDevice = CGMainDisplayID(); |
int width = CGDisplayPixelsWide(mainDevice); |
int height = CGDisplayPixelsHigh(mainDevice); |
@@ -62,8 +62,8 @@ void VideoFrameCapturerMacTest::CaptureDoneCallback1( |
EXPECT_EQ(initial_region, capture_data->dirty_region()); |
} |
-void VideoFrameCapturerMacTest::CaptureDoneCallback2( |
- scoped_refptr<CaptureData> capture_data) { |
+void ScreenCapturerMacTest::CaptureDoneCallback2( |
+ scoped_refptr<ScreenCaptureData> capture_data) { |
CGDirectDisplayID mainDevice = CGMainDisplayID(); |
int width = CGDisplayPixelsWide(mainDevice); |
int height = CGDisplayPixelsHigh(mainDevice); |
@@ -78,15 +78,15 @@ void VideoFrameCapturerMacTest::CaptureDoneCallback2( |
abs(capture_data->stride())); |
} |
-TEST_F(VideoFrameCapturerMacTest, Capture) { |
+TEST_F(ScreenCapturerMacTest, Capture) { |
if (!CheckSnowLeopard()) { |
return; |
} |
EXPECT_CALL(delegate_, OnCaptureCompleted(_)) |
.Times(2) |
- .WillOnce(Invoke(this, &VideoFrameCapturerMacTest::CaptureDoneCallback1)) |
- .WillOnce(Invoke(this, &VideoFrameCapturerMacTest::CaptureDoneCallback2)); |
+ .WillOnce(Invoke(this, &ScreenCapturerMacTest::CaptureDoneCallback1)) |
+ .WillOnce(Invoke(this, &ScreenCapturerMacTest::CaptureDoneCallback2)); |
EXPECT_CALL(delegate_, OnCursorShapeChangedPtr(_)) |
.Times(AnyNumber()); |
@@ -103,7 +103,7 @@ TEST_F(VideoFrameCapturerMacTest, Capture) { |
capturer_->Stop(); |
} |
-} // namespace remoting |
+} // namespace media |
namespace gfx { |