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

Unified Diff: third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-getSettings.html

Issue 2819653003: Image Capture: Reject applyConstraints() if passed an unsupported constraint (Closed)
Patch Set: reillyg@s comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-getSettings.html
diff --git a/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-getSettings.html b/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-getSettings.html
index cfbb98545f88382b7e2652e99d60ef86d629eab0..e2daf3872a276b0015cd82054cc4b786e63461c2 100644
--- a/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-getSettings.html
+++ b/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-getSettings.html
@@ -52,6 +52,14 @@ async_test(function(t) {
var stream = canvas.captureStream();
videoTrack = stream.getVideoTracks()[0];
+ // |videoTrack|'s capabilities gathering, just like the actual capture, is
+ // a process kicked off right after creation, we introduce a small delay
+ // to allow for those to be collected, since they are needed to understand
+ // which constraints are supported in applyConstraints().
+ // TODO(mcasas): this shouldn't be needed, https://crbug.com/711524.
+ return new Promise(resolve => setTimeout(resolve, 100));
+ })
+ .then(function() {
return videoTrack.applyConstraints(constraints);
})
.then(function() {

Powered by Google App Engine
This is Rietveld 408576698