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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-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, 4 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</title> 4 <title>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="video"></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 video = document.getElementById('video'); 15 var video = document.querySelector('video');
17 assert_not_equals(video, null); 16 assert_not_equals(video, null);
18 17
19 // Test MediaKeys assignment. 18 // Test MediaKeys assignment.
20 assert_equals(video.mediaKeys, null); 19 assert_equals(video.mediaKeys, null);
21 assert_equals(typeof video.setMediaKeys, 'function'); 20 assert_equals(typeof video.setMediaKeys, 'function');
22 21
23 // Try setting mediaKeys to null. 22 // Try setting mediaKeys to null.
24 video.setMediaKeys(null).then(function(result) { 23 video.setMediaKeys(null).then(function(result) {
25 assert_equals(video.mediaKeys, null); 24 assert_equals(video.mediaKeys, null);
26 25
(...skipping 19 matching lines...) Expand all
46 assert_not_equals(video.mediaKeys, null); 45 assert_not_equals(video.mediaKeys, null);
47 assert_true(video.mediaKeys === mediaKeys); 46 assert_true(video.mediaKeys === mediaKeys);
48 test.done(); 47 test.done();
49 }).catch(function(error) { 48 }).catch(function(error) {
50 forceTestFailureFromPromise(test, error); 49 forceTestFailureFromPromise(test, error);
51 }); 50 });
52 }, 'Setting MediaKeys on a video object.'); 51 }, 'Setting MediaKeys on a video object.');
53 </script> 52 </script>
54 </body> 53 </body>
55 </html> 54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698