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

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

Issue 2270383002: clean up encrypted-media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Reset src after setMediaKeys()</title> 4 <title>Reset src after setMediaKeys()</title>
5 <script src="encrypted-media-utils.js"></script> 5 <script src="encrypted-media-utils.js"></script>
6 <script src="../../resources/testharness.js"></script> 6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script> 7 <script src="../../resources/testharnessreport.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <video id="testVideo"></video> 10 <video></video>
11 <div id="log"></div>
12 <script> 11 <script>
13 async_test(function(test) 12 async_test(function(test)
14 { 13 {
15 var mediaKeys; 14 var mediaKeys;
16 var encryptedEventIndex = 0; 15 var encryptedEventIndex = 0;
17 var video = document.getElementById('testVideo'); 16 var video = document.querySelector('video');
18 assert_not_equals(video, null); 17 assert_not_equals(video, null);
19 18
20 // Content to be played. These files must be the same format. 19 // Content to be played. These files must be the same format.
21 var content = '../content/test-encrypted.webm'; 20 var content = '../content/test-encrypted.webm';
22 var alternateContent = '../content/test-encrypted-different-av-k eys.webm'; 21 var alternateContent = '../content/test-encrypted-different-av-k eys.webm';
23 22
24 var onEncrypted = function(event) 23 var onEncrypted = function(event)
25 { 24 {
26 ++encryptedEventIndex; 25 ++encryptedEventIndex;
27 assert_not_equals(video.mediaKeys, null); 26 assert_not_equals(video.mediaKeys, null);
(...skipping 26 matching lines...) Expand all
54 // Set src to a video. 53 // Set src to a video.
55 waitForEventAndRunStep('encrypted', video, onEncrypted, test ); 54 waitForEventAndRunStep('encrypted', video, onEncrypted, test );
56 video.src = content; 55 video.src = content;
57 }).catch(function(error) { 56 }).catch(function(error) {
58 forceTestFailureFromPromise(test, error); 57 forceTestFailureFromPromise(test, error);
59 }); 58 });
60 }, 'Reset src after setMediaKeys().'); 59 }, 'Reset src after setMediaKeys().');
61 </script> 60 </script>
62 </body> 61 </body>
63 </html> 62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698