Chromium Code Reviews| 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..a4823c8b20359aa904df2b6b3b21ece5d86a1291 100644 |
| --- a/content/test/data/media/image_capture_test.html |
| +++ b/content/test/data/media/image_capture_test.html |
| @@ -6,12 +6,11 @@ B<!DOCTYPE html> |
| <body> |
| <script type="text/javascript" src="webrtc_test_utilities.js"></script> |
| <script> |
| -const HEIGHT = 180; |
| const WIDTH = 320; |
| +const constraints = { width: { max : WIDTH } }; |
|
xianglu
2016/10/28 16:33:55
/** @const */ var constraints = { width: { max : W
mcasas
2016/10/28 17:00:49
Done.
|
| // Runs an ImageCapture.getPhotoCapabilities(). |
| function testCreateAndGetCapabilities() { |
| - const constraints = { mandatory: { maxHeight: HEIGHT, maxWidth: WIDTH } }; |
| navigator.mediaDevices.getUserMedia({"video" : constraints}) |
| .then(stream => { |
| assertEquals('video', stream.getVideoTracks()[0].kind); |
| @@ -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,7 +30,6 @@ function testCreateAndGetCapabilities() { |
| // Runs an ImageCapture.takePhoto(). |
| function testCreateAndTakePhoto() { |
| - const constraints = { mandatory: { maxHeight: HEIGHT, maxWidth: WIDTH } }; |
| navigator.mediaDevices.getUserMedia({"video" : constraints}) |
| .then(stream => { |
| assertEquals('video', stream.getVideoTracks()[0].kind); |
| @@ -62,7 +51,6 @@ function testCreateAndTakePhoto() { |
| // Runs an ImageCapture.grabFrame(). |
| function testCreateAndGrabFrame() { |
| - const constraints = { mandatory: { maxHeight: HEIGHT, maxWidth: WIDTH } }; |
| navigator.mediaDevices.getUserMedia({"video" : constraints}) |
| .then(stream => { |
| assertEquals('video', stream.getVideoTracks()[0].kind); |
| @@ -73,7 +61,6 @@ function testCreateAndGrabFrame() { |
| }) |
| .then(imageBitmap => { |
| assertEquals(WIDTH, imageBitmap.width); |
| - assertEquals(HEIGHT, imageBitmap.height); |
| reportTestSuccess(); |
| }) |