OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test handling of invalid responses for update().</title> | 4 <title>Test handling of invalid responses for update().</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> | 10 <div id="log"></div> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 mediaKeySession.update(jwkSetArray).then(function() { | 48 mediaKeySession.update(jwkSetArray).then(function() { |
49 forceTestFailureFromPromise(test, 'Error: update() succe
eded'); | 49 forceTestFailureFromPromise(test, 'Error: update() succe
eded'); |
50 }, function(error) { | 50 }, function(error) { |
51 assert_equals(error.name, 'InvalidAccessError'); | 51 assert_equals(error.name, 'InvalidAccessError'); |
52 test.done(); | 52 test.done(); |
53 }); | 53 }); |
54 } | 54 } |
55 | 55 |
56 getSupportedInitDataType().then(function(type) { | 56 getSupportedInitDataType().then(function(type) { |
57 initDataType = type; | 57 initDataType = type; |
58 return navigator.requestMediaKeySystemAccess('org.w3.clearke
y', [{}]); | 58 return navigator.requestMediaKeySystemAccess('org.w3.clearke
y', simpleConfigurationForInitDataType(initDataType)); |
59 }).then(function(access) { | 59 }).then(function(access) { |
60 return access.createMediaKeys(); | 60 return access.createMediaKeys(); |
61 }).then(function(mediaKeys) { | 61 }).then(function(mediaKeys) { |
62 mediaKeySession = mediaKeys.createSession(); | 62 mediaKeySession = mediaKeys.createSession(); |
63 waitForEventAndRunStep('message', mediaKeySession, processMe
ssage, test); | 63 waitForEventAndRunStep('message', mediaKeySession, processMe
ssage, test); |
64 return mediaKeySession.generateRequest(initDataType, getInit
Data(initDataType)); | 64 return mediaKeySession.generateRequest(initDataType, getInit
Data(initDataType)); |
65 }); | 65 }); |
66 }, 'update() with response longer than 64Kb characters.'); | 66 }, 'update() with response longer than 64Kb characters.'); |
67 </script> | 67 </script> |
68 </body> | 68 </body> |
69 </html> | 69 </html> |
OLD | NEW |