OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Invalid Clear Key License.</title> | 4 <title>Invalid Clear Key License.</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 <div id="log"></div> | |
11 <script> | 10 <script> |
12 async_test(function(test) | 11 async_test(function(test) |
13 { | 12 { |
14 var initDataType; | 13 var initDataType; |
15 var initData; | 14 var initData; |
16 var invalidLicense = new Uint8Array( | 15 var invalidLicense = new Uint8Array( |
17 [0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77]); | 16 [0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77]); |
18 | 17 |
19 function handleMessage(event) { | 18 function handleMessage(event) { |
20 event.target.update(invalidLicense).then(function(event) { | 19 event.target.update(invalidLicense).then(function(event) { |
(...skipping 13 matching lines...) Expand all Loading... |
34 var keySession = mediaKeys.createSession(); | 33 var keySession = mediaKeys.createSession(); |
35 keySession.addEventListener('message', handleMessage, false)
; | 34 keySession.addEventListener('message', handleMessage, false)
; |
36 keySession.generateRequest(initDataType, initData); | 35 keySession.generateRequest(initDataType, initData); |
37 }).catch(function(error) { | 36 }).catch(function(error) { |
38 forceTestFailureFromPromise(test, error); | 37 forceTestFailureFromPromise(test, error); |
39 }); | 38 }); |
40 }, 'Invalid Clear Key License.'); | 39 }, 'Invalid Clear Key License.'); |
41 </script> | 40 </script> |
42 </body> | 41 </body> |
43 </html> | 42 </html> |
OLD | NEW |