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

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

Issue 2787933002: ImageCapture: separate fillLightMode, redEyeReduction and Torch (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../resources/mojo-helpers.js"></script> 4 <script src="../resources/mojo-helpers.js"></script>
5 <script src="resources/mock-imagecapture.js"></script> 5 <script src="resources/mock-imagecapture.js"></script>
6 <body> 6 <body>
7 <canvas id='canvas' width=10 height=10/> 7 <canvas id='canvas' width=10 height=10/>
8 </body> 8 </body>
9 <script> 9 <script>
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 exposureCompensation : 133.77, 29 exposureCompensation : 133.77,
30 colorTemperature : 6000, 30 colorTemperature : 6000,
31 iso : 120.0, 31 iso : 120.0,
32 32
33 brightness : 3, 33 brightness : 3,
34 contrast : 4, 34 contrast : 4,
35 saturation : 5, 35 saturation : 5,
36 sharpness : 6, 36 sharpness : 6,
37 37
38 zoom : 3.141592 38 zoom : 3.141592,
39 // TODO: torch https://crbug.com/700607. 39
40 torch : true
40 }]}; 41 }]};
41 42
42 var theMock = null; 43 var theMock = null;
43 mockImageCaptureReady 44 mockImageCaptureReady
44 .then(mock => { 45 .then(mock => {
45 theMock = mock; 46 theMock = mock;
46 var stream = canvas.captureStream(); 47 var stream = canvas.captureStream();
47 var videoTrack = stream.getVideoTracks()[0]; 48 var videoTrack = stream.getVideoTracks()[0];
48 49
49 return videoTrack.applyConstraints(constraints); 50 return videoTrack.applyConstraints(constraints);
(...skipping 21 matching lines...) Expand all
71 72
72 assert_equals(constraints.advanced[0].brightness, 73 assert_equals(constraints.advanced[0].brightness,
73 theMock.options().brightness, 'brightness value'); 74 theMock.options().brightness, 'brightness value');
74 assert_equals(constraints.advanced[0].contrast, 75 assert_equals(constraints.advanced[0].contrast,
75 theMock.options().contrast, 'constrast value'); 76 theMock.options().contrast, 'constrast value');
76 assert_equals(constraints.advanced[0].saturation, 77 assert_equals(constraints.advanced[0].saturation,
77 theMock.options().saturation, 'saturation value'); 78 theMock.options().saturation, 'saturation value');
78 assert_equals(constraints.advanced[0].sharpness, 79 assert_equals(constraints.advanced[0].sharpness,
79 theMock.options().sharpness, 'sharpness value'); 80 theMock.options().sharpness, 'sharpness value');
80 81
82 assert_equals(constraints.advanced[0].torch, theMock.options().torch,
83 'torch');
84
81 t.done(); 85 t.done();
82 }) 86 })
83 .catch(error => { 87 .catch(error => {
84 assert_unreached("applyConstraints(): " + error.message); 88 assert_unreached("applyConstraints(): " + error.message);
85 }) 89 })
86 90
87 }, 'exercises MediaStreamTrack.applyConstraints(constraints)'); 91 }, 'exercises MediaStreamTrack.applyConstraints(constraints)');
88 92
89 </script> 93 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698