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

Issue 2286303003: Video capture Android: enable unittests for Camera2 API (Closed)

Created:
4 years, 3 months ago by mcasas
Modified:
4 years, 3 months ago
Reviewers:
emircan, jbudorick
CC:
chromium-reviews, posciak+watch_chromium.org, feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Video capture Android: enable unittests for Camera2 API This CL reenables a bunch of VideoCaptureDeviceTest test cases for Android and for the "new" APIs For this: - adds a |mTestMode| to VideoCapture.java, interface of all camera java classes. VCCamera2.java tests this flag and adds a capture thread if it's set. - the C++ correspondent classes get a method to configure the java side for testing, and a method to test if the underlying platform is using the new or the old APIs. Also: - Removes DeAllocateCameraWhileRunning because it was equivalent to CaptureWithSize test case. - Cleans up/refactors some parts of the unit tests, adds a few more comments etc BUG=626857 Committed: https://crrev.com/7c32b70068c65b7bb372bb52a33d70b8e6653129 Cr-Commit-Position: refs/heads/master@{#417015}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : jbudorick@s comments #

Total comments: 6

Patch Set 3 : emircan@ comments #

Total comments: 2

Patch Set 4 : jbudorick@ comment: Stopping mMainHandler thread in test mode #

Patch Set 5 : Addressing mem leak. Rebase #

Messages

Total messages: 42 (23 generated)
mcasas
jbudorick@ please take a first look
4 years, 3 months ago (2016-08-30 16:28:54 UTC) #5
mcasas
jbudorick@ ping emircan@ PTAL
4 years, 3 months ago (2016-09-01 18:13:30 UTC) #7
jbudorick
https://codereview.chromium.org/2286303003/diff/40001/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java File media/capture/video/android/java/src/org/chromium/media/VideoCapture.java (right): https://codereview.chromium.org/2286303003/diff/40001/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java#newcode37 media/capture/video/android/java/src/org/chromium/media/VideoCapture.java:37: protected boolean mTestMode = true; nit: name this more ...
4 years, 3 months ago (2016-09-01 18:46:42 UTC) #8
mcasas
PTAL https://codereview.chromium.org/2286303003/diff/40001/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java File media/capture/video/android/java/src/org/chromium/media/VideoCapture.java (right): https://codereview.chromium.org/2286303003/diff/40001/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java#newcode37 media/capture/video/android/java/src/org/chromium/media/VideoCapture.java:37: protected boolean mTestMode = true; On 2016/09/01 18:46:41, ...
4 years, 3 months ago (2016-09-01 20:52:37 UTC) #10
emircan
https://codereview.chromium.org/2286303003/diff/100001/media/capture/video/android/video_capture_device_factory_android.cc File media/capture/video/android/video_capture_device_factory_android.cc (right): https://codereview.chromium.org/2286303003/diff/100001/media/capture/video/android/video_capture_device_factory_android.cc#newcode122 media/capture/video/android/video_capture_device_factory_android.cc:122: break; Why is this change? This would push_back the ...
4 years, 3 months ago (2016-09-02 22:00:23 UTC) #12
mcasas
jbudorick@ ping emircan@ PTAL
4 years, 3 months ago (2016-09-02 22:01:06 UTC) #13
mcasas
PTAL https://codereview.chromium.org/2286303003/diff/100001/media/capture/video/android/video_capture_device_factory_android.cc File media/capture/video/android/video_capture_device_factory_android.cc (right): https://codereview.chromium.org/2286303003/diff/100001/media/capture/video/android/video_capture_device_factory_android.cc#newcode122 media/capture/video/android/video_capture_device_factory_android.cc:122: break; On 2016/09/02 22:00:23, emircan wrote: > Why ...
4 years, 3 months ago (2016-09-02 22:27:07 UTC) #14
emircan
lgtm
4 years, 3 months ago (2016-09-06 17:35:53 UTC) #15
jbudorick
https://codereview.chromium.org/2286303003/diff/120001/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java File media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java (right): https://codereview.chromium.org/2286303003/diff/120001/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java#newcode540 media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java:540: thread.start(); Do we stop this thread at any point?
4 years, 3 months ago (2016-09-06 18:44:23 UTC) #16
mcasas
PTAL https://codereview.chromium.org/2286303003/diff/120001/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java File media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java (right): https://codereview.chromium.org/2286303003/diff/120001/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java#newcode540 media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java:540: thread.start(); On 2016/09/06 18:44:23, jbudorick wrote: > Do ...
4 years, 3 months ago (2016-09-06 22:48:36 UTC) #17
jbudorick
lgtm
4 years, 3 months ago (2016-09-06 22:51:23 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2286303003/140001
4 years, 3 months ago (2016-09-06 23:01:22 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/221982)
4 years, 3 months ago (2016-09-06 23:13:27 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2286303003/140001
4 years, 3 months ago (2016-09-07 05:23:41 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/222164)
4 years, 3 months ago (2016-09-07 05:34:53 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2286303003/220001
4 years, 3 months ago (2016-09-07 18:54:11 UTC) #37
commit-bot: I haz the power
Committed patchset #5 (id:220001)
4 years, 3 months ago (2016-09-07 18:58:51 UTC) #39
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/7c32b70068c65b7bb372bb52a33d70b8e6653129 Cr-Commit-Position: refs/heads/master@{#417015}
4 years, 3 months ago (2016-09-07 19:00:05 UTC) #41
aelias_OOO_until_Jul13
4 years, 3 months ago (2016-09-08 01:27:00 UTC) #42
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:220001) has been created in
https://codereview.chromium.org/2320873002/ by aelias@chromium.org.

The reason for reverting is: Caused WebViewLayoutTest#testMediaStreamApi and
MediaAccessPermissionRequestTest#testGrantAccess to consistently fail.

Confirmed locally by reverting patch, commenting out @DisableIf and running:

ninja -C out/Release android_webview_test_apk android_webview_apk &&
out/Release/bin/run_android_webview_test_apk -f
MediaAccessPermissionRequestTest.*

BUG=644910.

Powered by Google App Engine
This is Rietveld 408576698