| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Reloading during encrypted media playback</title> | 4 <title>Reloading during encrypted media playback</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 id="testVideo"></video> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 if (location.hash == '#x') { | 72 if (location.hash == '#x') { |
| 73 test.done(); | 73 test.done(); |
| 74 return; | 74 return; |
| 75 } | 75 } |
| 76 | 76 |
| 77 location.hash += 'x'; | 77 location.hash += 'x'; |
| 78 location.reload(); | 78 location.reload(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { | 81 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { |
| 82 | |
| 83 waitForEventAndRunStep('needkey', video, onNeedKey, test); | 82 waitForEventAndRunStep('needkey', video, onNeedKey, test); |
| 84 waitForEventAndRunStep('playing', video, onPlaying, test); | 83 waitForEventAndRunStep('playing', video, onPlaying, test); |
| 85 | |
| 86 video.setMediaKeys(mediaKeys); | |
| 87 video.src = '../content/test-encrypted.webm'; | 84 video.src = '../content/test-encrypted.webm'; |
| 85 return video.setMediaKeys(mediaKeys); |
| 86 }).then(function(result) { |
| 88 video.play(); | 87 video.play(); |
| 89 }).catch(function(error) { | 88 }).catch(function(error) { |
| 90 forceTestFailureFromPromise(test, error); | 89 forceTestFailureFromPromise(test, error); |
| 91 }); | 90 }); |
| 92 }, 'Reloading during encrypted media playback.'); | 91 }, 'Reloading during encrypted media playback.'); |
| 93 </script> | 92 </script> |
| 94 </body> | 93 </body> |
| 95 </html> | 94 </html> |
| OLD | NEW |