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

Side by Side Diff: LayoutTests/media/encrypted-media/encrypted-media-lifetime-reload.html

Issue 665213002: Implement navigator.requestMediaKeySystemAccess() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updates Created 6 years, 2 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>Reloading during encrypted media playback</title> 4 <title>Reloading during encrypted media playback</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 id="testVideo"></video>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Reload the page to catch any possible teardown issues. 73 // Reload the page to catch any possible teardown issues.
74 if (location.hash == '#x') { 74 if (location.hash == '#x') {
75 test.done(); 75 test.done();
76 return; 76 return;
77 } 77 }
78 78
79 location.hash += 'x'; 79 location.hash += 'x';
80 location.reload(); 80 location.reload();
81 } 81 }
82 82
83 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { 83 navigator.requestMediaKeySystemAccess('org.w3.clearkey').then(fu nction(access) {
84 return access.createMediaKeys();
85 }).then(function(mediaKeys) {
84 waitForEventAndRunStep('encrypted', video, onEncrypted, test ); 86 waitForEventAndRunStep('encrypted', video, onEncrypted, test );
85 waitForEventAndRunStep('playing', video, onPlaying, test); 87 waitForEventAndRunStep('playing', video, onPlaying, test);
86 video.src = '../content/test-encrypted.webm'; 88 video.src = '../content/test-encrypted.webm';
87 return video.setMediaKeys(mediaKeys); 89 return video.setMediaKeys(mediaKeys);
88 }).then(function(result) { 90 }).then(function(result) {
89 video.play(); 91 video.play();
90 }).catch(function(error) { 92 }).catch(function(error) {
91 forceTestFailureFromPromise(test, error); 93 forceTestFailureFromPromise(test, error);
92 }); 94 });
93 }, 'Reloading during encrypted media playback.'); 95 }, 'Reloading during encrypted media playback.');
94 </script> 96 </script>
95 </body> 97 </body>
96 </html> 98 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698