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

Side by Side Diff: media/test/data/eme_player.html

Issue 854633003: Verify heartbeat messages have type 'license-renewal' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renewal Created 5 years, 11 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 lang='en-US'> 2 <html lang='en-US'>
3 <head> 3 <head>
4 <title>EME playback test application</title> 4 <title>EME playback test application</title>
5 </head> 5 </head>
6 <body style='font-family:"Lucida Console", Monaco, monospace; font-size:14px'> 6 <body style='font-family:"Lucida Console", Monaco, monospace; font-size:14px'>
7 <i>Clearkey works only with content encrypted using bear key.</i><br><br> 7 <i>Clearkey works only with content encrypted using bear key.</i><br><br>
8 <table> 8 <table>
9 <tr title='URL param mediaFile=...'> 9 <tr title='URL param mediaFile=...'>
10 <td><label for='mediaFile'>Encrypted video URL:</label></td> 10 <td><label for='mediaFile'>Encrypted video URL:</label></td>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return; 69 return;
70 // For loadSession() tests, addKey() will not be called after 70 // For loadSession() tests, addKey() will not be called after
71 // loadSession() (the key is loaded internally). Do not check keyadded 71 // loadSession() (the key is loaded internally). Do not check keyadded
72 // and heartbeat for these tests. 72 // and heartbeat for these tests.
73 if (!testConfig.sessionToLoad) { 73 if (!testConfig.sessionToLoad) {
74 // keyadded may be fired around the start of playback; check for it 74 // keyadded may be fired around the start of playback; check for it
75 // after a delay to avoid timing issues. 75 // after a delay to avoid timing issues.
76 if (testConfig.usePrefixedEME && !video.receivedKeyAdded) 76 if (testConfig.usePrefixedEME && !video.receivedKeyAdded)
77 Utils.failTest('Key added event not received.'); 77 Utils.failTest('Key added event not received.');
78 if (testConfig.keySystem == EXTERNAL_CLEARKEY && 78 if (testConfig.keySystem == EXTERNAL_CLEARKEY &&
79 !testConfig.usePrefixedEME &&
80 !video.receivedRenewalMessage)
81 Utils.failTest('license-renewal message not received.');
82 if (testConfig.keySystem == EXTERNAL_CLEARKEY &&
83 testConfig.usePrefixedEME &&
79 !video.receivedHeartbeat) 84 !video.receivedHeartbeat)
80 Utils.failTest('Heartbeat keymessage event not received.'); 85 Utils.failTest('Heartbeat keymessage event not received.');
81 } 86 }
82 video.removeEventListener('ended', Utils.failTest); 87 video.removeEventListener('ended', Utils.failTest);
83 Utils.installTitleEventHandler(video, 'ended'); 88 Utils.installTitleEventHandler(video, 'ended');
84 video.removeEventListener('timeupdate', onTimeUpdate); 89 video.removeEventListener('timeupdate', onTimeUpdate);
85 } 90 }
86 91
87 function Play(video) { 92 function Play(video) {
88 Utils.resetTitleChange(); 93 Utils.resetTitleChange();
(...skipping 11 matching lines...) Expand all
100 element.style['display'] = 'none'; 105 element.style['display'] = 'none';
101 else 106 else
102 element.style['display'] = ''; 107 element.style['display'] = '';
103 } 108 }
104 109
105 emeApp.createPlayer() 110 emeApp.createPlayer()
106 .then(function(player) { Play(player.video); }) 111 .then(function(player) { Play(player.video); })
107 .catch(function(error) { Utils.failTest('Unable to play video.'); }); 112 .catch(function(error) { Utils.failTest('Unable to play video.'); });
108 </script> 113 </script>
109 </html> 114 </html>
OLDNEW
« no previous file with comments | « no previous file | media/test/data/eme_player_js/player_utils.js » ('j') | media/test/data/eme_player_js/player_utils.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698