| OLD | NEW | 
|   1 <!DOCTYPE html> |   1 <!DOCTYPE html> | 
|   2 <html> |   2 <html> | 
|   3     <head> |   3     <head> | 
|   4         <title>Test MediaKeySession not callable immediately after CreateSession
    ().</title> |   4         <title>Test MediaKeySession not callable immediately after CreateSession
    ().</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             // After creation, the MediaKeySession object is not |  11             // After creation, the MediaKeySession object is not | 
|  13             // callable, and we should get a InvalidStateError. |  12             // callable, and we should get a InvalidStateError. | 
|  14  |  13  | 
|  15             promise_test(function() |  14             promise_test(function() | 
|  16             { |  15             { | 
|  17                 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', 
    getSimpleConfiguration()).then(function(access) { |  16                 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', 
    getSimpleConfiguration()).then(function(access) { | 
|  18                     return access.createMediaKeys(); |  17                     return access.createMediaKeys(); | 
|  19                 }).then(function(mediaKeys) { |  18                 }).then(function(mediaKeys) { | 
|  20                     var mediaKeySession = mediaKeys.createSession(); |  19                     var mediaKeySession = mediaKeys.createSession(); | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  54                         assert_unreached('remove() succeeded unexpectedly.'); |  53                         assert_unreached('remove() succeeded unexpectedly.'); | 
|  55                     }).catch(function(error) { |  54                     }).catch(function(error) { | 
|  56                         assert_equals(error.name, 'InvalidStateError'); |  55                         assert_equals(error.name, 'InvalidStateError'); | 
|  57                     }); |  56                     }); | 
|  58                 }); |  57                 }); | 
|  59             }, 'Remove() immediately after CreateSession().'); |  58             }, 'Remove() immediately after CreateSession().'); | 
|  60         </script> |  59         </script> | 
|  61     </body> |  60     </body> | 
|  62 </html> |  61 </html> | 
|  63  |  62  | 
| OLD | NEW |