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

Unified Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-reset-src-after-setmediakeys.html

Issue 2084053002: EME: Update tests so 'audioCapabilities' always provided (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes (+rebase) Created 4 years, 5 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/media/encrypted-media/encrypted-media-reset-src-after-setmediakeys.html
diff --git a/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-reset-src-after-setmediakeys.html b/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-reset-src-after-setmediakeys.html
index 1e3c94a5bea4681e1f881922e04fa01fc3eb0dbf..fdb45e88f31fe00975295d87b33ed76ae3e6976f 100644
--- a/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-reset-src-after-setmediakeys.html
+++ b/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-reset-src-after-setmediakeys.html
@@ -17,6 +17,10 @@
var video = document.getElementById('testVideo');
assert_not_equals(video, null);
+ // Content to be played. These files must be the same format.
+ var content = '../content/test-encrypted.webm';
+ var alternateContent = '../content/test-encrypted-different-av-keys.webm';
+
var onEncrypted = function(event)
{
++encryptedEventIndex;
@@ -27,7 +31,7 @@
// for the video stream each time .src is set.
if (encryptedEventIndex == 2) {
// Finished first video; set src to a different video.
- video.src = '../content/test-encrypted-different-av-keys.webm';
+ video.src = alternateContent;
} else if (encryptedEventIndex == 4) {
// Finished second video.
test.done();
@@ -35,7 +39,7 @@
};
// Create a MediaKeys object and assign it to video.
- navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}])
+ navigator.requestMediaKeySystemAccess('org.w3.clearkey', getConfigurationForFile(content))
.then(function(access) {
assert_equals(access.keySystem, 'org.w3.clearkey');
return access.createMediaKeys();
@@ -49,7 +53,7 @@
// Set src to a video.
waitForEventAndRunStep('encrypted', video, onEncrypted, test);
- video.src = '../content/test-encrypted.webm';
+ video.src = content;
}).catch(function(error) {
forceTestFailureFromPromise(test, error);
});

Powered by Google App Engine
This is Rietveld 408576698