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

Unified Diff: third_party/WebKit/LayoutTests/imagecapture/setoptions.html

Issue 2239583002: ImageCapture: support enhanced FocusMode getting/setting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reillyg@ comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imagecapture/setoptions.html
diff --git a/third_party/WebKit/LayoutTests/imagecapture/setoptions.html b/third_party/WebKit/LayoutTests/imagecapture/setoptions.html
index f6d32a038ee0ebc1504906dbb77a88eeb6b5255a..4f7b2de18302e4e195721f636e7ef39a72b6836b 100644
--- a/third_party/WebKit/LayoutTests/imagecapture/setoptions.html
+++ b/third_party/WebKit/LayoutTests/imagecapture/setoptions.html
@@ -8,9 +8,10 @@
</body>
<script>
+const focusModeNames = ["unavailable", "manual", "single-shot", "continuous"];
+
// This test verifies that ImageCapture can call setOptions()s, with a mock Mojo
// interface implementation.
-
async_test(function(t) {
var canvas = document.getElementById('canvas');
var context = canvas.getContext("2d");
@@ -19,7 +20,10 @@ async_test(function(t) {
var stream = canvas.captureStream();
var theMock = null;
- const optionsDict = { zoom : 7, imageWidth : 1080, imageHeight : 100 };
+ const optionsDict = { zoom : 7,
+ imageWidth : 1080,
+ imageHeight : 100,
+ focusMode : "continuous" };
mockImageCaptureReady
.then(mock => {
theMock = mock;
@@ -38,6 +42,10 @@ async_test(function(t) {
assert_equals(optionsDict.imageWidth, theMock.options().width, 'width value');
assert_equals(true, theMock.options().has_height, 'has_height must be true');
assert_equals(optionsDict.imageHeight, theMock.options().height, 'height value');
+ assert_equals(true, theMock.options().has_focus_mode, 'has_focus_mode must be true');
+ assert_equals(optionsDict.focusMode,
+ focusModeNames[theMock.options().focus_mode],
+ 'focusMode value');
t.done();
})
.catch(error => {

Powered by Google App Engine
This is Rietveld 408576698