diff --git a/webrtc/build/apk_tests.gyp b/webrtc/build/apk_tests.gyp index 92d26845c..f916cdf22 100644 --- a/webrtc/build/apk_tests.gyp +++ b/webrtc/build/apk_tests.gyp @@ -217,19 +217,17 @@ { 'target_name': 'video_capture_tests_apk', 'type': 'none', - # TODO(kjellander): uncomment the following after adding - # include_internal_video_capture=1 to the APK buildbot's $GYP_DEFINES. - # 'variables': { - # 'test_suite_name': 'video_capture_tests', - # 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)video_capture_tests<(SHARED_LIB_SUFFIX)', - # }, - # 'dependencies': [ - # '<(webrtc_root)/modules/modules.gyp:video_capture_tests', - # 'video_capture_java', - # ], - # 'includes': [ - # '../../../build/apk_test.gypi', - # ], + 'variables': { + 'test_suite_name': 'video_capture_tests', + 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)video_capture_tests<(SHARED_LIB_SUFFIX)', + }, + 'dependencies': [ + '<(webrtc_root)/modules/modules.gyp:video_capture_tests', + 'video_capture_java', + ], + 'includes': [ + '../../../build/apk_test.gypi', + ], }, { # Used only by video_capture_tests_apk above, and impossible to use in the diff --git a/webrtc/modules/video_capture/video_capture.gypi b/webrtc/modules/video_capture/video_capture.gypi index c638e698c..6df062a81 100644 --- a/webrtc/modules/video_capture/video_capture.gypi +++ b/webrtc/modules/video_capture/video_capture.gypi @@ -133,6 +133,15 @@ }, ], 'conditions': [ + ['include_tests==1 and build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { + # Use WebRTC capture code for Android APK tests that are built from a + # Chromium checkout. Normally when built as a part of Chromium the + # Chromium video capture code is used. This overrides the default in + # webrtc/build/common.gypi. + 'variables': { + 'include_internal_video_capture': 1, + }, + }], ['include_tests==1', { 'targets': [ {