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

Unified Diff: third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html

Issue 1926873002: MediaStream Image Capture (3): Adding mojo and browser impl for dummy takePhoto(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const auto& Created 4 years, 8 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/fast/imagecapture/ImageCapture-takePhoto.html
diff --git a/third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html b/third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html
new file mode 100644
index 0000000000000000000000000000000000000000..b8d40007f7865d030c46fd188bb67c570729a533
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src=../../resources/testharness.js></script>
+<script src=../../resources/testharnessreport.js></script>
+<body>
+<canvas id='canvas0' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies ImageCapture's takePhoto().
+
+var test = async_test(function() {
+ var canvas0 = document.getElementById('canvas0');
+ var context0 = canvas0.getContext("2d");
+ context0.fillStyle = "red";
+ context0.fillRect(0, 0, 10, 10);
+
+ var stream = canvas0.captureStream();
+
+ var capturer = new ImageCapture(stream.getVideoTracks()[0]);
+
+ capturer.takePhoto()
+ .then(blob => {
+ assert_true(blob.type.length > 0);
+ assert_true(blob.size > 0);
+ this.done();
+ })
+ .catch(error => {
+ assert_unreached('Error during takePhoto(): '+ error);
+ });
+}, 'exercises the ImageCapture API takePhoto().');
+
+</script>
« no previous file with comments | « content/content_browser.gypi ('k') | third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698