Image Capture: make sure applyConstraints() only works for ImageCapture constraints
This CL:
- makes sure MediaStreamTrack::applyConstraints() is rejected if non
image-capture related constraints are passed; (this follows the
Spec e.g. in [1], " If the constraints cannot be applied, the promise is
rejected").
- generally cleans up MediaStreamTrack::applyConstraints() moving
part of the TODO()s to Image Capture so that they are in the
same place (facilitates later reviews).
- derives to clearMediaTrackConstraints() if the constraint set is
empty, after spec issue somehow clarified it
LayoutTests updated/extended.
[1] https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/applyConstraints#Return_value
BUG=700607, 708723
Review-Url: https://codereview.chromium.org/2804653003
Cr-Commit-Position: refs/heads/master@{#462531}
5 files changed