Chromium Code Reviews

Issue 2723903003: Add unit tests for RTCMTLVideoView. (Closed)

Created:
3 years, 9 months ago by daniela-webrtc
Modified:
3 years, 9 months ago
Reviewers:
magjed_webrtc, kthelgason
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add unit tests for RTCMTLVideoView. To properly test the functionality, following changes were needed - Make RTCMTLVideoView compiliable for all cpu architectures not just arm64. This is needed so that the test can run on any device and on simulator as well. - Refactor RTCMTLVideoView to have mockable class methods. The unittest class, RTCMTLVideoViewTests was designed to provide easy transition to XCTest when the time comes for that. To transition to XCTest it would suffice to inherit from XCTestCase and remove the gtest methods. BUG=webrtc:7079 Review-Url: https://codereview.webrtc.org/2723903003 Cr-Commit-Position: refs/heads/master@{#17014} Committed: https://chromium.googlesource.com/external/webrtc/+/0ebe0199acd1070f17ca2abc5bc22fdd8b0861ca

Patch Set 1 #

Patch Set 2 : Fix property vs ivar use #

Total comments: 13

Patch Set 3 : Replace superclass types with proper types #

Total comments: 1

Patch Set 4 : Sort imports #

Patch Set 5 : Fix unittest target to include test for ios only #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Stats (+228 lines, -24 lines)
M webrtc/sdk/BUILD.gn View 2 chunks +7 lines, -0 lines 0 comments
M webrtc/sdk/objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h View 2 chunks +9 lines, -7 lines 0 comments
M webrtc/sdk/objc/Framework/Classes/Metal/RTCMTLVideoView.m View 4 chunks +44 lines, -17 lines 0 comments
A webrtc/sdk/objc/Framework/UnitTests/RTCMTLVideoViewTests.mm View 1 chunk +168 lines, -0 lines 0 comments

Messages

Total messages: 25 (11 generated)
daniela-webrtc
Please review.
3 years, 9 months ago (2017-03-01 13:21:12 UTC) #2
kthelgason
It's not completely clear to me when and on which platforms we include metal. IIUC ...
3 years, 9 months ago (2017-03-02 08:23:05 UTC) #3
daniela-webrtc
On 2017/03/02 08:23:05, kthelgason wrote: > It's not completely clear to me when and on ...
3 years, 9 months ago (2017-03-02 09:46:21 UTC) #4
magjed_webrtc
https://codereview.webrtc.org/2723903003/diff/20001/webrtc/sdk/BUILD.gn File webrtc/sdk/BUILD.gn (right): https://codereview.webrtc.org/2723903003/diff/20001/webrtc/sdk/BUILD.gn#newcode263 webrtc/sdk/BUILD.gn:263: sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ] Is it ok to ...
3 years, 9 months ago (2017-03-02 13:28:18 UTC) #5
daniela-webrtc
https://codereview.webrtc.org/2723903003/diff/20001/webrtc/sdk/BUILD.gn File webrtc/sdk/BUILD.gn (right): https://codereview.webrtc.org/2723903003/diff/20001/webrtc/sdk/BUILD.gn#newcode263 webrtc/sdk/BUILD.gn:263: sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ] On 2017/03/02 13:28:18, magjed_webrtc ...
3 years, 9 months ago (2017-03-03 08:47:02 UTC) #6
kthelgason
lgtm, thanks for adding these!
3 years, 9 months ago (2017-03-03 12:39:34 UTC) #7
magjed_webrtc
lgtm https://codereview.webrtc.org/2723903003/diff/20001/webrtc/sdk/objc/Framework/UnitTests/RTCMTLVideoViewTests.mm File webrtc/sdk/objc/Framework/UnitTests/RTCMTLVideoViewTests.mm (right): https://codereview.webrtc.org/2723903003/diff/20001/webrtc/sdk/objc/Framework/UnitTests/RTCMTLVideoViewTests.mm#newcode100 webrtc/sdk/objc/Framework/UnitTests/RTCMTLVideoViewTests.mm:100: [self.rendererMock verify]; On 2017/03/03 08:47:02, denicija-webrtc wrote: > ...
3 years, 9 months ago (2017-03-03 12:55:51 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2723903003/60001
3 years, 9 months ago (2017-03-03 14:12:44 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: mac_baremetal on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/mac_baremetal/builds/19494)
3 years, 9 months ago (2017-03-03 14:21:56 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2723903003/80001
3 years, 9 months ago (2017-03-03 14:51:03 UTC) #16
commit-bot: I haz the power
Failed to apply patch for webrtc/sdk/objc/Framework/Classes/Metal/RTCMTLVideoView.m: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-03-03 15:46:17 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.webrtc.org/2723903003/100001
3 years, 9 months ago (2017-03-03 15:48:18 UTC) #21
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/external/webrtc/+/0ebe0199acd1070f17ca2abc5bc22fdd8b0861ca
3 years, 9 months ago (2017-03-03 16:24:11 UTC) #24
kthelgason
3 years, 9 months ago (2017-03-08 14:12:38 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.webrtc.org/2733953006/ by kthelgason@webrtc.org.

The reason for reverting is: This CL depends on a reverted CL..

Powered by Google App Engine