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

Unified Diff: third_party/WebKit/LayoutTests/fast/mediacapturefromelement/HTMLMediaElementCapture-EME-content.html

Issue 1599533003: MediaCaptureFromElement: add support for audio captureStream(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: using refptr iso WeakPtr Created 4 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/fast/mediacapturefromelement/HTMLMediaElementCapture-EME-content.html
diff --git a/third_party/WebKit/LayoutTests/fast/mediacapturefromelement/HTMLMediaElementCapture-EME-content.html b/third_party/WebKit/LayoutTests/fast/mediacapturefromelement/HTMLMediaElementCapture-EME-content.html
new file mode 100644
index 0000000000000000000000000000000000000000..0c2b0db96c335137f146a5f770577a449bf1a97f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/mediacapturefromelement/HTMLMediaElementCapture-EME-content.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src=../../resources/testharness.js></script>
+<script src=../../resources/testharnessreport.js></script>
+<script>
+
+// Run createStream() on a <video> source with protected content.
+
+test(function() {
+ var video = document.createElement('video');
+
+ assert_equals(video.error, null);
+ assert_equals(video.mediaKeys, null);
+ video.onencrypted = this.step_func_done();
+
+ navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]).then(function(access) {
+ return access.createMediaKeys();
+ }).then(function(mediaKeys) {
+ return video.setMediaKeys(mediaKeys);
+ }).then(function(result) {
+ video.src = "../../media/content/test-encrypted.webm";
+ assert_throws("NotSupportedError",
+ function() { var stream = video.captureStream(); },
+ "Cannot create a captureStream() out of a protected <video>");
+ });
+
+}, 'check <video> captureStream() fails on an encrypted/protected media');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698