Bug 186471

Summary: MediaTrackCapabilities.deviceId and groupId are not hashed.
Product: WebKit Reporter: jianjun.zhu
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac   
OS: macOS 10.13   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description jianjun.zhu 2018-06-10 01:49:06 PDT
MediaTrackCapabilities.deviceId and groupId are not hashed.
Comment 1 jianjun.zhu 2018-06-10 01:52:03 PDT
Created attachment 342381 [details]
Patch
Comment 2 youenn fablet 2018-06-10 08:26:40 PDT
Can we add a tes validating that track ids match enuerateDevice ids?
Comment 3 jianjun.zhu 2018-06-10 09:00:35 PDT
(In reply to youenn fablet from comment #2)
> Can we add a tes validating that track ids match enuerateDevice ids?

I'll try to add an assertion to MediaStreamTrack-getCapabilities.html.
Comment 4 jianjun.zhu 2018-06-10 23:33:07 PDT
Created attachment 342412 [details]
Patch
Comment 5 Eric Carlson 2018-06-11 09:04:26 PDT
Comment on attachment 342412 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=342412&action=review

Thank you for the fix!

> LayoutTests/fast/mediastream/MediaStreamTrack-getCapabilities.html:47
> +                if(trackKind !== 'audio' && trackKind !== 'video')

Nit: tests typically have a space between "if" and "("

> LayoutTests/fast/mediastream/MediaStreamTrack-getCapabilities.html:51
> +                    if(deviceInfo.deviceId === deviceId && deviceInfo.kind === deviceKind) {

Ditto.

> LayoutTests/fast/mediastream/MediaStreamTrack-getCapabilities.html:89
> +                },e => {

Nit: missing a space between "," and "e"
Comment 6 jianjun.zhu 2018-06-11 18:54:57 PDT
Created attachment 342500 [details]
Patch
Comment 7 Eric Carlson 2018-06-12 07:58:44 PDT
Comment on attachment 342500 [details]
Patch

r=me
Comment 8 Eric Carlson 2018-06-12 08:02:30 PDT
Jianjun - for future reference, a patch doesn't *need* another review once a reviewer give it an "r+". Replace "NOBODY (OOPS!)" with the reviewer's name before you upload the revised patch, mark it "cq?" and any committer can mark it "cq+"
Comment 9 WebKit Commit Bot 2018-06-12 08:28:20 PDT
Comment on attachment 342500 [details]
Patch

Clearing flags on attachment: 342500

Committed r232754: <https://trac.webkit.org/changeset/232754>
Comment 10 WebKit Commit Bot 2018-06-12 08:28:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-06-12 08:29:20 PDT
<rdar://problem/41046888>
Comment 12 jianjun.zhu 2018-06-12 08:58:23 PDT
Eric, thanks for reviewing the patch and letting me know the review process.