Bug 160791 - Add tests for parsing of Media Constraints in getUserMedia()
Summary: Add tests for parsing of Media Constraints in getUserMedia()
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-08-11 17:36 PDT by George Ruan
Modified: 2017-08-30 11:46 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Ruan 2016-08-11 17:36:10 PDT
Currently there is only limited testing on the parsing of mandatory constraints in getUserMedia.

Full testing can be made possible after implementation of getSettings(): https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-getsettings.
Comment 1 Radar WebKit Bug Importer 2016-08-11 17:37:28 PDT
<rdar://problem/27815747>
Comment 2 George Ruan 2016-08-11 17:41:02 PDT
(In reply to comment #0)
> Currently there is only limited testing on the parsing of mandatory
> constraints in getUserMedia.
> 
> Full testing can be made possible after implementation of getSettings():
> https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-getsettings.

I mispoke. getSettings() is already implemented. Full testing is possible after there is support for a media stream track being able to set its settings according to the constraints passed through to getUserMedia.
Comment 3 George Ruan 2016-08-11 18:47:03 PDT
Some tests that come to mind include:
- Checking that arbitrary constraints are ignored.
- Checking that supported constraints with empty scalar value are ignored.
- Checking that supported constraints with empty dictionary values are ignored.
- Checking that supported string constraints with empty array values are ignored.

- Checking that advanced constraints with scalar values are treated as 'exact' values
- Checking that mandatory constraints with scalar values are treated as 'ideal' values

- Checking that boolean, double, and long constraints can accept only scalar and dictionary values.
- Checking that string constraints can handle sequences, scalar, and dictionary values
- Checking that string dictionary constraint values can handle both scalars and sequences for the 'exact' and 'ideal' key.