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

Side by Side Diff: third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-getSettings.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
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 the settings defined in the mock Mojo service 13 // This test verifies that the settings defined in the mock Mojo service
15 // implementation are the same as those returned by the corresponding 14 // implementation are the same as those returned by the corresponding
16 // MediaStreamTrack.getSettings(). 15 // MediaStreamTrack.getSettings().
17 16
18 async_test(function(t) { 17 async_test(function(t) {
19 var canvas = document.getElementById('canvas'); 18 var canvas = document.getElementById('canvas');
20 var context = canvas.getContext("2d"); 19 var context = canvas.getContext("2d");
21 context.fillStyle = "red"; 20 context.fillStyle = "red";
22 context.fillRect(0, 0, 10, 10); 21 context.fillRect(0, 0, 10, 10);
(...skipping 29 matching lines...) Expand all
52 mock_settings.color_temperature.current); 51 mock_settings.color_temperature.current);
53 assert_equals(settings.iso, mock_settings.iso.current); 52 assert_equals(settings.iso, mock_settings.iso.current);
54 53
55 assert_equals(settings.brightness, mock_settings.brightness.current); 54 assert_equals(settings.brightness, mock_settings.brightness.current);
56 assert_equals(settings.contrast, mock_settings.contrast.current); 55 assert_equals(settings.contrast, mock_settings.contrast.current);
57 assert_equals(settings.saturation, mock_settings.saturation.current); 56 assert_equals(settings.saturation, mock_settings.saturation.current);
58 assert_equals(settings.sharpness, mock_settings.sharpness.current); 57 assert_equals(settings.sharpness, mock_settings.sharpness.current);
59 58
60 assert_equals(settings.zoom, mock_settings.zoom.current); 59 assert_equals(settings.zoom, mock_settings.zoom.current);
61 60
62 // TODO(mcasas): check |torch| when the mojom interface is updated, 61 assert_equals(settings.torch, mock_settings.torch);
63 // https://crbug.com/700607.
64 62
65 t.done(); 63 t.done();
66 }, 100); 64 }, 100);
67 }, 65 },
68 error => { 66 error => {
69 assert_unreached("Error creating MockImageCapture: " + error); 67 assert_unreached("Error creating MockImageCapture: " + error);
70 }); 68 });
71 69
72 }, 'exercises MediaStreamTrack.getSettings()'); 70 }, 'exercises MediaStreamTrack.getSettings()');
73 71
74 </script> 72 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698