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

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

Issue 2877273002: Image Capture: reject setOptions()/applyConstraints() if any argument is unsupported (Closed)
Patch Set: cleanup Created 3 years, 7 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/takephoto.html
diff --git a/third_party/WebKit/LayoutTests/imagecapture/takephoto.html b/third_party/WebKit/LayoutTests/imagecapture/takephoto.html
deleted file mode 100644
index 21950b472cc884692d3195bd714686ff9a3bc7cb..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imagecapture/takephoto.html
+++ /dev/null
@@ -1,42 +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 takePhoto()s, 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();
-
- mockImageCaptureReady
- .then(mock => {
- return new ImageCapture(stream.getVideoTracks()[0]);
- },
- error => {
- assert_unreached("Error creating MockImageCapture: " + error);
- })
- .then(capturer => {
- return capturer.takePhoto();
- })
- .then(blob => {
- // JS Blob is almost-opaque, can only check |type| and |size|.
- assert_equals(blob.type, 'image/cat');
- assert_equals(blob.size, 2);
- t.done();
- })
- .catch(error => {
- assert_unreached("Error during takePhoto(): " + error.message);
- });
-}, 'exercises ImageCapture.takePhoto()');
-
-</script>

Powered by Google App Engine
This is Rietveld 408576698