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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-setmediakeys-multiple-times-with-the-same-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 the same MediaKeys.</title> 4 <title>setMediaKeys() multiple times with the same 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 mediaKeys; 16 var mediaKeys;
18 17
19 assert_equals(video.mediaKeys, null); 18 assert_equals(video.mediaKeys, null);
20 19
21 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', getConfigurationForFile(content)).then(function(access) { 20 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', getConfigurationForFile(content)).then(function(access) {
22 return access.createMediaKeys(); 21 return access.createMediaKeys();
23 }).then(function(result) { 22 }).then(function(result) {
24 mediaKeys = result; 23 mediaKeys = result;
25 assert_not_equals(mediaKeys, null); 24 assert_not_equals(mediaKeys, null);
(...skipping 11 matching lines...) Expand all
37 // Set mediaKeys again on video should still return a 36 // Set mediaKeys again on video should still return a
38 // resolved promise. 37 // resolved promise.
39 return video.setMediaKeys(mediaKeys); 38 return video.setMediaKeys(mediaKeys);
40 }).then(function() { 39 }).then(function() {
41 assert_true(video.mediaKeys === mediaKeys); 40 assert_true(video.mediaKeys === mediaKeys);
42 }); 41 });
43 }, 'setMediaKeys() multiple times with the same MediaKeys.'); 42 }, 'setMediaKeys() multiple times with the same MediaKeys.');
44 </script> 43 </script>
45 </body> 44 </body>
46 </html> 45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698