OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Waiting for a key.</title> | 4 <title>Waiting for a key.</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></video> |
11 <div id="log"></div> | |
12 <script> | 11 <script> |
13 // For debugging timeouts, keep track of the number of the | 12 // For debugging timeouts, keep track of the number of the |
14 // various events received. | 13 // various events received. |
15 var debugEncryptedEventCount = 0; | 14 var debugEncryptedEventCount = 0; |
16 var debugWaitingForKeyEventCount = 0; | 15 var debugWaitingForKeyEventCount = 0; |
17 var debugTimeUpdateEventCount = 0; | 16 var debugTimeUpdateEventCount = 0; |
18 var debugMessage = ''; | 17 var debugMessage = ''; |
19 | 18 |
20 promise_test(function(test) | 19 promise_test(function(test) |
21 { | 20 { |
22 var video = document.getElementById('testVideo'); | 21 var video = document.querySelector('video'); |
23 var content = '../content/test-encrypted.webm'; | 22 var content = '../content/test-encrypted.webm'; |
24 var initData; | 23 var initData; |
25 var initDataType; | 24 var initDataType; |
26 var mediaKeySession; | 25 var mediaKeySession; |
27 | 26 |
28 test.timeout = function() | 27 test.timeout = function() |
29 { | 28 { |
30 var message = 'timeout. message = ' + debugMessage | 29 var message = 'timeout. message = ' + debugMessage |
31 + ', encrypted: ' + debugEncryptedEventCount | 30 + ', encrypted: ' + debugEncryptedEventCount |
32 + ', waitingforkey: ' + debugWaitingForKeyEve
ntCount | 31 + ', waitingforkey: ' + debugWaitingForKeyEve
ntCount |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 if (video.currentTime < 0.2) | 154 if (video.currentTime < 0.2) |
156 return; | 155 return; |
157 video.removeEventListener('timeupdate', listener); | 156 video.removeEventListener('timeupdate', listener); |
158 resolve(e); | 157 resolve(e); |
159 }); | 158 }); |
160 }); | 159 }); |
161 }; | 160 }; |
162 </script> | 161 </script> |
163 </body> | 162 </body> |
164 </html> | 163 </html> |
OLD | NEW |