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

Unified Diff: third_party/WebKit/LayoutTests/fast/imagecapture/MediaStreamTrack-getCapabilities.html

Issue 2747573002: Image Capture: MediaStreamTrack::getCapabilities() (Closed)
Patch Set: haraken@ and reillyg@s comments Created 3 years, 9 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/MediaStreamTrack-getCapabilities.html
diff --git a/third_party/WebKit/LayoutTests/fast/imagecapture/MediaStreamTrack-getCapabilities.html b/third_party/WebKit/LayoutTests/fast/imagecapture/MediaStreamTrack-getCapabilities.html
new file mode 100644
index 0000000000000000000000000000000000000000..6ba461e18e5f09512af134c582f0607d57ea8a83
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/imagecapture/MediaStreamTrack-getCapabilities.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src=../../resources/testharness.js></script>
+<script src=../../resources/testharnessreport.js></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies that MediaStreamTrack.getCapabilities() exists and that it
+// returns something. Other tests go deeper.
+test(function() {
+ var canvas = document.getElementById('canvas');
+ var context = canvas.getContext("2d");
+ context.fillStyle = "red";
+ context.fillRect(0, 0, 10, 10);
+
+ var stream = canvas.captureStream();
+ assert_equals(stream.getAudioTracks().length, 0);
+ assert_equals(stream.getVideoTracks().length, 1);
+
+ var videoTrack = stream.getVideoTracks()[0];
+
+ assert_equals(typeof videoTrack.getCapabilities, 'function');
+
+ capabilities = videoTrack.getCapabilities();
+ assert_equals(typeof capabilities, 'object');
+}, 'MediaStreamTrack.getCapabilities()');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698