Index: webrtc/modules/desktop_capture/screen_capturer_unittest.cc |
diff --git a/webrtc/modules/desktop_capture/screen_capturer_unittest.cc b/webrtc/modules/desktop_capture/screen_capturer_unittest.cc |
index 49fcb8aafbe0a2da8a70d4a61f1f0e4ce59356eb..6d2c0eb0658221f98ebb4f34d18a22076de8521a 100644 |
--- a/webrtc/modules/desktop_capture/screen_capturer_unittest.cc |
+++ b/webrtc/modules/desktop_capture/screen_capturer_unittest.cc |
@@ -16,11 +16,16 @@ |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "webrtc/base/constructormagic.h" |
+#include "webrtc/base/logging.h" |
#include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
#include "webrtc/modules/desktop_capture/desktop_frame.h" |
#include "webrtc/modules/desktop_capture/desktop_region.h" |
#include "webrtc/modules/desktop_capture/screen_capturer_mock_objects.h" |
+#if defined(WEBRTC_WIN) |
+#include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h" |
+#endif // defined(WEBRTC_WIN) |
+ |
using ::testing::_; |
using ::testing::AnyNumber; |
using ::testing::Return; |
@@ -146,6 +151,11 @@ TEST_F(ScreenCapturerTest, UseMagnifier) { |
} |
TEST_F(ScreenCapturerTest, UseDirectxCapturer) { |
+ if (!ScreenCapturerWinDirectx::IsSupported()) { |
+ LOG(LS_WARNING) << "Directx capturer is not supported"; |
+ return; |
+ } |
+ |
DesktopCaptureOptions options(DesktopCaptureOptions::CreateDefault()); |
options.set_allow_directx_capturer(true); |
capturer_.reset(ScreenCapturer::Create(options)); |
@@ -161,6 +171,11 @@ TEST_F(ScreenCapturerTest, UseDirectxCapturer) { |
} |
TEST_F(ScreenCapturerTest, UseDirectxCapturerWithSharedBuffers) { |
+ if (!ScreenCapturerWinDirectx::IsSupported()) { |
+ LOG(LS_WARNING) << "Directx capturer is not supported"; |
+ return; |
+ } |
+ |
DesktopCaptureOptions options(DesktopCaptureOptions::CreateDefault()); |
options.set_allow_directx_capturer(true); |
capturer_.reset(ScreenCapturer::Create(options)); |