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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-setmediakeys-multiple-times-with-different-mediakeys.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>setMediaKeys() multiple times with different MediaKeys.</title> 4 <title>setMediaKeys() multiple times with different MediaKeys.</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="video"></video> 10 <video></video>
11 <div id="log"></div>
12 <script> 11 <script>
13 promise_test(function(test) 12 promise_test(function(test)
14 { 13 {
15 var video = document.getElementById('video'); 14 var video = document.querySelector('video');
16 var content = '../content/test-encrypted.webm'; 15 var content = '../content/test-encrypted.webm';
17 var keySystemAccess; 16 var keySystemAccess;
18 var mediaKeys1; 17 var mediaKeys1;
19 var mediaKeys2; 18 var mediaKeys2;
20 19
21 assert_equals(video.mediaKeys, null); 20 assert_equals(video.mediaKeys, null);
22 21
23 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', getConfigurationForFile(content)).then(function(access) { 22 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', getConfigurationForFile(content)).then(function(access) {
24 keySystemAccess = access; 23 keySystemAccess = access;
25 // Create a mediaKeys. 24 // Create a mediaKeys.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 }, function(error) { 69 }, function(error) {
71 assert_true(video.mediaKeys === mediaKeys1); 70 assert_true(video.mediaKeys === mediaKeys1);
72 assert_equals(error.name, 'InvalidStateError'); 71 assert_equals(error.name, 'InvalidStateError');
73 assert_not_equals(error.message, ''); 72 assert_not_equals(error.message, '');
74 return Promise.resolve(); 73 return Promise.resolve();
75 }); 74 });
76 }, 'setMediaKeys() multiple times with different MediaKeys.'); 75 }, 'setMediaKeys() multiple times with different MediaKeys.');
77 </script> 76 </script>
78 </body> 77 </body>
79 </html> 78 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698