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

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

Issue 423633002: Make HTMLMediaElement.setMediaKeys() asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase + add comment Created 6 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
« no previous file with comments | « no previous file | LayoutTests/media/encrypted-media/encrypted-media-playback-multiple-sessions.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 if (location.hash == '#x') { 71 if (location.hash == '#x') {
72 test.done(); 72 test.done();
73 return; 73 return;
74 } 74 }
75 75
76 location.hash += 'x'; 76 location.hash += 'x';
77 location.reload(); 77 location.reload();
78 } 78 }
79 79
80 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { 80 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) {
81
82 waitForEventAndRunStep('needkey', video, onNeedKey, test); 81 waitForEventAndRunStep('needkey', video, onNeedKey, test);
83 waitForEventAndRunStep('playing', video, onPlaying, test); 82 waitForEventAndRunStep('playing', video, onPlaying, test);
84
85 video.setMediaKeys(mediaKeys);
86 video.src = '../content/test-encrypted.webm'; 83 video.src = '../content/test-encrypted.webm';
84 return video.setMediaKeys(mediaKeys);
85 }).then(function(result) {
87 video.play(); 86 video.play();
88 }).catch(function(error) { 87 }).catch(function(error) {
89 forceTestFailureFromPromise(test, error); 88 forceTestFailureFromPromise(test, error);
90 }); 89 });
91 }, 'Reloading during encrypted media playback.'); 90 }, 'Reloading during encrypted media playback.');
92 </script> 91 </script>
93 </body> 92 </body>
94 </html> 93 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/encrypted-media/encrypted-media-playback-multiple-sessions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698