Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: webrtc/modules/desktop_capture/screen_capturer_unittest.cc

Issue 2247943002: [WebRTC] Disable DirectX capturer tests if the system does not support it. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add log if directx capturer is not supported. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698