| Index: third_party/WebKit/LayoutTests/imagecapture/getphotocapabilities.html
|
| diff --git a/third_party/WebKit/LayoutTests/imagecapture/getphotocapabilities.html b/third_party/WebKit/LayoutTests/imagecapture/getphotocapabilities.html
|
| deleted file mode 100644
|
| index 1a9c03a87b3b5794d3e6981bf7f726c7e80042cf..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/LayoutTests/imagecapture/getphotocapabilities.html
|
| +++ /dev/null
|
| @@ -1,66 +0,0 @@
|
| -<!DOCTYPE html>
|
| -<script src="../resources/testharness.js"></script>
|
| -<script src="../resources/testharnessreport.js"></script>
|
| -<script src="../resources/mojo-helpers.js"></script>
|
| -<script src="resources/mock-imagecapture.js"></script>
|
| -<body>
|
| -<canvas id='canvas' width=10 height=10/>
|
| -</body>
|
| -<script>
|
| -
|
| -// This test verifies that ImageCapture can get PhotoCapabilities(), with a mock
|
| -// Mojo interface implementation.
|
| -
|
| -async_test(function(t) {
|
| - var canvas = document.getElementById('canvas');
|
| - var context = canvas.getContext("2d");
|
| - context.fillStyle = "red";
|
| - context.fillRect(0, 0, 10, 10);
|
| - var stream = canvas.captureStream();
|
| -
|
| - var mock_capabilities;
|
| - mockImageCaptureReady
|
| - .then(mock => {
|
| - mock_capabilities = mock.capabilities();
|
| - return new ImageCapture(stream.getVideoTracks()[0]);
|
| - },
|
| - error => {
|
| - assert_unreached("Error creating MockImageCapture: " + error);
|
| - })
|
| - .then(capturer => {
|
| - assert_true(typeof capturer.getPhotoCapabilities == 'function');
|
| - return capturer.getPhotoCapabilities();
|
| - })
|
| - .then(capabilities => {
|
| - assert_true(capabilities instanceof PhotoCapabilities);
|
| -
|
| - assert_equals(capabilities.redEyeReduction, 'controllable',
|
| - 'redEyeReduction');
|
| -
|
| - assert_true(capabilities.imageHeight instanceof MediaSettingsRange);
|
| - assert_equals(capabilities.imageHeight.max,
|
| - mock_capabilities.height.max);
|
| - assert_equals(capabilities.imageHeight.min,
|
| - mock_capabilities.height.min);
|
| - assert_equals(capabilities.imageHeight.step,
|
| - mock_capabilities.height.step);
|
| -
|
| - assert_true(capabilities.imageWidth instanceof MediaSettingsRange);
|
| - assert_equals(capabilities.imageWidth.max,
|
| - mock_capabilities.width.max);
|
| - assert_equals(capabilities.imageWidth.min,
|
| - mock_capabilities.width.min);
|
| - assert_equals(capabilities.imageWidth.step, mock_capabilities.width.step);
|
| -
|
| - assert_array_equals(capabilities.fillLightMode, [ 'auto', 'flash' ],
|
| - 'fillLightMode');
|
| -
|
| - t.done();
|
| - })
|
| - .catch(error => {
|
| - assert_unreached("Error during getPhotoCapabilities(): " + error.message);
|
| - });
|
| -
|
| -}, 'exercises ImageCapture.getPhotoCapabilities()');
|
| -
|
| -</script>
|
|
|