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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/imagecapture/MediaStreamTrack-getCapabilities.html

Issue 2747573002: Image Capture: MediaStreamTrack::getCapabilities() (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src=../../resources/testharness.js></script>
3 <script src=../../resources/testharnessreport.js></script>
4 <body>
5 <canvas id='canvas' width=10 height=10/>
6 </body>
7 <script>
8
9 // This test verifies that MediaStreamTrack.getCapabilities() exists and that it
10 // returns something. (Other tests go deeper).
Reilly Grant (use Gerrit) 2017/03/14 21:38:57 No parens.
mcasas 2017/03/14 22:28:01 Done.
11 async_test(function(test) {
Reilly Grant (use Gerrit) 2017/03/14 21:38:57 Why not a synchronous test?
mcasas 2017/03/14 22:28:01 No reason, removed. (Actually it was so because o
12 var canvas = document.getElementById('canvas');
13 var context = canvas.getContext("2d");
14 context.fillStyle = "red";
15 context.fillRect(0, 0, 10, 10);
16
17 var stream = canvas.captureStream();
18 assert_equals(stream.getAudioTracks().length, 0);
19 assert_equals(stream.getVideoTracks().length, 1);
20
21 var videoTrack = stream.getVideoTracks()[0];
22
23 assert_equals(typeof videoTrack.getCapabilities, 'function');
24
25 capabilities = videoTrack.getCapabilities();
26 assert_equals(typeof capabilities, 'object');
27
28 test.done();
29 }, 'MediaStreamTrack.getCapabilities()');
30
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698