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

Side by Side Diff: third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-getSettings.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 const meteringModeNames = ["none", "manual", "single-shot", "continuous"]; 11 const meteringModeNames = ["none", "manual", "single-shot", "continuous"];
12 12
13 // This test verifies that we can all MediaStreamTrack.applyConstraints(), with 13 // This test verifies that we can all MediaStreamTrack.applyConstraints(), with
14 // a mock Mojo service implementation. 14 // a mock Mojo service implementation.
15 15
16 async_test(function(t) { 16 async_test(function(t) {
17 var canvas = document.getElementById('canvas'); 17 var canvas = document.getElementById('canvas');
18 var context = canvas.getContext("2d"); 18 var context = canvas.getContext("2d");
19 context.fillStyle = "red"; 19 context.fillStyle = "red";
20 context.fillRect(0, 0, 10, 10); 20 context.fillRect(0, 0, 10, 10);
21 21
22 const constraints = { advanced : [{ whiteBalanceMode : "manual", 22 const constraints = { advanced : [{ whiteBalanceMode : "single-shot",
23 exposureMode : "continuous", 23 exposureMode : "continuous",
24 focusMode : "single-shot", 24 focusMode : "single-shot",
25 25
26 pointsOfInterest : [{x : 0.1, y : 0.2}, 26 pointsOfInterest : [{x : 0.1, y : 0.2},
27 {x : 0.3, y : 0.4}], 27 {x : 0.3, y : 0.4}],
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
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 t.done(); 106 t.done();
107 }) 107 })
108 .catch(error => { 108 .catch(error => {
109 assert_unreached("applyConstraints(): " + error.message); 109 assert_unreached("applyConstraints(): " + error.message);
110 }) 110 })
111 111
112 }, 'exercises MediaStreamTrack.applyConstraints(constraints)'); 112 }, 'exercises MediaStreamTrack.applyConstraints(constraints)');
113 113
114 </script> 114 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-getSettings.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698