OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Test removing keywords from controlsList shows buttons</title> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <script src="../../media-resources/media-file.js"></script> |
| 6 <script src="../../media-resources/media-controls.js"></script> |
| 7 <video controlslist="nodownload nofullscreen" id="disabled-controls" width="500p
x"></video> |
| 8 <script> |
| 9 async_test(t => { |
| 10 var v = document.getElementById('disabled-controls'); |
| 11 |
| 12 v.addEventListener('canplaythrough', t.step_func(e => { |
| 13 assert_equals(getComputedStyle(fullscreenButton(v)).display, 'none'); |
| 14 assert_equals(getComputedStyle(downloadButton(v)).display, 'none'); |
| 15 |
| 16 v.controlsList.remove('nodownload'); |
| 17 |
| 18 testRunner.layoutAndPaintAsyncThen(t.step_func(() => { |
| 19 assert_equals(getComputedStyle(fullscreenButton(v)).display, 'none'); |
| 20 assert_not_equals(getComputedStyle(downloadButton(v)).display, 'none'); |
| 21 |
| 22 v.controlsList.remove('nofullscreen'); |
| 23 |
| 24 testRunner.layoutAndPaintAsyncThen(t.step_func_done(() => { |
| 25 assert_not_equals(getComputedStyle(fullscreenButton(v)).display, 'none')
; |
| 26 assert_not_equals(getComputedStyle(downloadButton(v)).display, 'none'); |
| 27 })); |
| 28 })); |
| 29 })); |
| 30 |
| 31 v.src = findMediaFile('video', '../resources/test'); |
| 32 }, 'Test enabling controls on the video element with them enabled.'); |
| 33 </script> |
| 34 |
OLD | NEW |