| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src=../video-test.js></script> |
| <script> |
| async function runTest() { |
| findMediaElement(); |
| |
| let trackElement = video.appendChild(document.createElement('track')); |
| trackElement.src = 'captions-webvtt/position-align.vtt'; |
| trackElement.track.mode = 'showing'; |
| |
| waitFor(trackElement, 'error').then(failTest); |
| await waitFor(trackElement, 'load'); |
| |
| let expected = { |
| length: 4, |
| tests: [ |
| { property: 'position', values: [0, 50, 100, 'auto']}, |
| { property: 'positionAlign', values: ['line-left', 'center', 'line-right', 'auto']}, |
| ], |
| }; |
| testCues(0, expected); |
| } |
| |
| window.addEventListener('load', event => { |
| runTest().then(endTest).catch(failTest); |
| }) |
| </script> |
| </head> |
| <body"> |
| <video></video> |
| </body> |
| </html> |