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

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

Issue 2773593004: Image Capture: prune Photo{Capabilities/Settings} and add MediaTrackConstraintSet.pointsOfInterest (Closed)
Patch Set: reillyg@ comments on idl urls. 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
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 const fillLightModeNames = ["none", "off", "auto", "flash", "torch"];
13 12
14 // This test verifies that we can all MediaStreamTrack.applyConstraints(), with 13 // This test verifies that we can all MediaStreamTrack.applyConstraints(), with
15 // a mock Mojo service implementation. 14 // a mock Mojo service implementation.
16 15
17 async_test(function(t) { 16 async_test(function(t) {
18 var canvas = document.getElementById('canvas'); 17 var canvas = document.getElementById('canvas');
19 var context = canvas.getContext("2d"); 18 var context = canvas.getContext("2d");
20 context.fillStyle = "red"; 19 context.fillStyle = "red";
21 context.fillRect(0, 0, 10, 10); 20 context.fillRect(0, 0, 10, 10);
22 21
23 const constraints = { advanced : [{ whiteBalanceMode : "manual", 22 const constraints = { advanced : [{ whiteBalanceMode : "manual",
24 exposureMode : "continuous", 23 exposureMode : "continuous",
25 focusMode : "single-shot", 24 focusMode : "single-shot",
26 25
26 pointsOfInterest : [{x : 0.1, y : 0.2},
27 {x : 0.3, y : 0.4}],
28
27 exposureCompensation : 133.77, 29 exposureCompensation : 133.77,
28 colorTemperature : 6000, 30 colorTemperature : 6000,
29 iso : 120.0, 31 iso : 120.0,
30 32
31 brightness : 3, 33 brightness : 3,
32 contrast : 4, 34 contrast : 4,
33 saturation : 5, 35 saturation : 5,
34 sharpness : 6, 36 sharpness : 6,
35 37
36 zoom : 3.141592 38 zoom : 3.141592
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 80
79 t.done(); 81 t.done();
80 }) 82 })
81 .catch(error => { 83 .catch(error => {
82 assert_unreached("applyConstraints(): " + error.message); 84 assert_unreached("applyConstraints(): " + error.message);
83 }) 85 })
84 86
85 }, 'exercises MediaStreamTrack.applyConstraints(constraints)'); 87 }, 'exercises MediaStreamTrack.applyConstraints(constraints)');
86 88
87 </script> 89 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698