| Index: content/test/data/media/image_capture_test.html
|
| diff --git a/content/test/data/media/image_capture_test.html b/content/test/data/media/image_capture_test.html
|
| index 0dbd39b3cc7c594407fd447eccdd24c51fa7ad1a..ec39281fbf0177e0f86e82d786f50570836549c8 100644
|
| --- a/content/test/data/media/image_capture_test.html
|
| +++ b/content/test/data/media/image_capture_test.html
|
| @@ -6,13 +6,12 @@ B<!DOCTYPE html>
|
| <body>
|
| <script type="text/javascript" src="webrtc_test_utilities.js"></script>
|
| <script>
|
| -const HEIGHT = 180;
|
| const WIDTH = 320;
|
| +/** @const */ var CONSTRAINTS = { width: { max : WIDTH } };
|
|
|
| // Runs an ImageCapture.getPhotoCapabilities().
|
| function testCreateAndGetCapabilities() {
|
| - const constraints = { mandatory: { maxHeight: HEIGHT, maxWidth: WIDTH } };
|
| - navigator.mediaDevices.getUserMedia({"video" : constraints})
|
| + navigator.mediaDevices.getUserMedia({"video" : CONSTRAINTS})
|
| .then(stream => {
|
| assertEquals('video', stream.getVideoTracks()[0].kind);
|
| return new ImageCapture(stream.getVideoTracks()[0]);
|
| @@ -21,16 +20,7 @@ function testCreateAndGetCapabilities() {
|
| return capturer.getPhotoCapabilities();
|
| })
|
| .then(capabilities => {
|
| - assertNotEquals(0, capabilities.imageHeight.min);
|
| - assertNotEquals(0, capabilities.imageHeight.current);
|
| - assertNotEquals(0, capabilities.imageHeight.max);
|
| - assertNotEquals(0, capabilities.imageWidth.min);
|
| - assertNotEquals(0, capabilities.imageWidth.current);
|
| - assertNotEquals(0, capabilities.imageWidth.max);
|
| - assertNotEquals(0, capabilities.zoom.min);
|
| - assertNotEquals(0, capabilities.zoom.current);
|
| - assertNotEquals(0, capabilities.zoom.max);
|
| -
|
| + // There's nothing to check here since |capabilities| vary per device.
|
| reportTestSuccess();
|
| })
|
| .catch(err => {
|
| @@ -40,8 +30,7 @@ function testCreateAndGetCapabilities() {
|
|
|
| // Runs an ImageCapture.takePhoto().
|
| function testCreateAndTakePhoto() {
|
| - const constraints = { mandatory: { maxHeight: HEIGHT, maxWidth: WIDTH } };
|
| - navigator.mediaDevices.getUserMedia({"video" : constraints})
|
| + navigator.mediaDevices.getUserMedia({"video" : CONSTRAINTS})
|
| .then(stream => {
|
| assertEquals('video', stream.getVideoTracks()[0].kind);
|
| return new ImageCapture(stream.getVideoTracks()[0]);
|
| @@ -62,8 +51,7 @@ function testCreateAndTakePhoto() {
|
|
|
| // Runs an ImageCapture.grabFrame().
|
| function testCreateAndGrabFrame() {
|
| - const constraints = { mandatory: { maxHeight: HEIGHT, maxWidth: WIDTH } };
|
| - navigator.mediaDevices.getUserMedia({"video" : constraints})
|
| + navigator.mediaDevices.getUserMedia({"video" : CONSTRAINTS})
|
| .then(stream => {
|
| assertEquals('video', stream.getVideoTracks()[0].kind);
|
| return new ImageCapture(stream.getVideoTracks()[0]);
|
| @@ -73,7 +61,6 @@ function testCreateAndGrabFrame() {
|
| })
|
| .then(imageBitmap => {
|
| assertEquals(WIDTH, imageBitmap.width);
|
| - assertEquals(HEIGHT, imageBitmap.height);
|
|
|
| reportTestSuccess();
|
| })
|
|
|