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

Side by Side Diff: content/test/data/media/encrypted_media_player.html

Issue 11469040: EME v0.1: Report defaultURL in KeyMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed c&p error and added new check for defaultURL Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/test/data/media/encrypted_media_utils.js » ('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>Encrypted Media Player</title> 4 <title>Encrypted Media Player</title>
5 </head> 5 </head>
6 <body onload="runTest();"> 6 <body onload="runTest();">
7 <video controls></video> 7 <video controls></video>
8 <script src="encrypted_media_utils.js" type="text/javascript"></script> 8 <script src="encrypted_media_utils.js" type="text/javascript"></script>
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 var video = document.querySelector('video'); 10 var video = document.querySelector('video');
11 11
12 function onTimeUpdate() { 12 function onTimeUpdate() {
13 // webkitkeyadded should have been fired before playback. 13 // webkitkeyadded should have been fired before playback.
14 if (!video.hasKeyAdded) 14 if (!video.receivedKeyAdded)
15 failTest('Key not added.'); 15 failTest('Key added event not received.');
16 if (video.currentTime < 1) 16 if (video.currentTime < 1)
17 return; 17 return;
18 if (video.isHeartbeatExpected && !video.receivedHeartbeat)
19 failTest('Heartbeat keymessage event not received.');
18 video.removeEventListener('ended', failTest); 20 video.removeEventListener('ended', failTest);
19 installTitleEventHandler(video, 'ended'); 21 installTitleEventHandler(video, 'ended');
20 video.removeEventListener('timeupdate', onTimeUpdate); 22 video.removeEventListener('timeupdate', onTimeUpdate);
21 } 23 }
22 24
23 // The test completes after playing the encrypted media for 1 second and 25 // The test completes after playing the encrypted media for 1 second and
24 // getting the ended event or when an error occurs at any time. 26 // getting the ended event or when an error occurs at any time.
25 function runTest() { 27 function runTest() {
26 loadEncryptedMediaFromURL(video); 28 loadEncryptedMediaFromURL(video);
27 video.addEventListener('timeupdate', onTimeUpdate); 29 video.addEventListener('timeupdate', onTimeUpdate);
28 video.play(); 30 video.play();
29 } 31 }
30 </script> 32 </script>
31 </body> 33 </body>
32 </html> 34 </html>
OLDNEW
« no previous file with comments | « no previous file | content/test/data/media/encrypted_media_utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698