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

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

Issue 2877273002: Image Capture: reject setOptions()/applyConstraints() if any argument is unsupported (Closed)
Patch Set: reverted renaming bc it breaks patching Created 3 years, 7 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
11 // This test verifies that the |constraints| configured in the mock Mojo 11 // This test verifies that the |constraints| configured in the mock Mojo
12 // service implementation, are returned by MediaStreamTrack.getSettings(). 12 // service implementation, are returned by MediaStreamTrack.getSettings().
13 13
14 async_test(function(t) { 14 async_test(function(t) {
15 var canvas = document.getElementById('canvas'); 15 var canvas = document.getElementById('canvas');
16 var context = canvas.getContext("2d"); 16 var context = canvas.getContext("2d");
17 context.fillStyle = "red"; 17 context.fillStyle = "red";
18 context.fillRect(0, 0, 10, 10); 18 context.fillRect(0, 0, 10, 10);
19 19
20 const constraints = { advanced : [{ whiteBalanceMode : "manual", 20 const constraints = { advanced : [{ whiteBalanceMode : "single-shot",
21 exposureMode : "continuous", 21 exposureMode : "continuous",
22 focusMode : "single-shot", 22 focusMode : "single-shot",
23 23
24 pointsOfInterest : [{x : 0.1, y : 0.2}, 24 pointsOfInterest : [{x : 0.1, y : 0.2},
25 {x : 0.3, y : 0.4}], 25 {x : 0.3, y : 0.4}],
26 26
27 exposureCompensation : 133.77, 27 exposureCompensation : 133.77,
28 colorTemperature : 6000, 28 colorTemperature : 6000,
29 iso : 120.0, 29 iso : 120.0,
30 30
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 t.done(); 107 t.done();
108 }) 108 })
109 .catch(error => { 109 .catch(error => {
110 assert_unreached("Error applying constraints: " + error.message); 110 assert_unreached("Error applying constraints: " + error.message);
111 }); 111 });
112 112
113 }, 'exercises an applyConstraints() - getSettings() cycle'); 113 }, 'exercises an applyConstraints() - getSettings() cycle');
114 114
115 </script> 115 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698