Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints.html |
| diff --git a/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints.html b/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints.html |
| index 9db07b1b5ca7091d8eaa61a82a97957a5a031dd9..eab9ffb1565a7f14a11125745f9d944ee2b026f0 100644 |
| --- a/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints.html |
| +++ b/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints.html |
| @@ -41,18 +41,26 @@ async_test(function(t) { |
| }]}; |
| var theMock = null; |
| + var videoTrack = null; |
| mockImageCaptureReady |
| .then(mock => { |
| theMock = mock; |
| var stream = canvas.captureStream(); |
| - var videoTrack = stream.getVideoTracks()[0]; |
| + videoTrack = stream.getVideoTracks()[0]; |
| - return videoTrack.applyConstraints(constraints); |
| + // |videoTrack|s capabilities, just like the actual capture, is a process |
| + // kicked right after creation, we introduce a small delay to allow for |
|
Reilly Grant (use Gerrit)
2017/04/14 19:46:17
Missing words? Should be "|videoTrack|'s capabilit
mcasas
2017/04/14 21:21:27
Rewritten, here and in the next file.
|
| + // those to be collected. |
| + // TODO(mcasas): this shouldn't be needed, https://crbug.com/711524. |
| + return new Promise((resolve) => setTimeout(resolve, 100)); |
|
Reilly Grant (use Gerrit)
2017/04/14 19:46:17
nit: no parenthesis around a single argument
mcasas
2017/04/14 21:21:27
Done.
|
| }, |
| error => { |
| assert_unreached("Error creating MockImageCapture: " + error); |
| }) |
| .then(function() { |
| + return videoTrack.applyConstraints(constraints); |
| + }) |
| + .then(function() { |
| assert_equals(constraints.advanced[0].whiteBalanceMode, |
| meteringModeNames[theMock.options().white_balance_mode], |
| 'whiteBalanceMode'); |