OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title><audio> without controls has display:none irrespective of author CSS</
title> |
| 3 <script src="../resources/testharness.js"></script> |
| 4 <script src="../resources/testharnessreport.js"></script> |
| 5 <style> |
| 6 audio { |
| 7 display: inline !important; |
| 8 } |
| 9 </style> |
| 10 <div id="log"></div> |
| 11 <script> |
| 12 test(function() { |
| 13 var audio = document.createElement('audio'); |
| 14 document.body.appendChild(audio); |
| 15 assert_equals(audio.clientWidth, 0); |
| 16 assert_equals(getComputedStyle(audio).display, "none"); |
| 17 audio.controls = true; |
| 18 assert_equals(audio.clientWidth, 300); |
| 19 assert_equals(getComputedStyle(audio).display, "inline"); |
| 20 audio.controls = false; |
| 21 assert_equals(audio.clientWidth, 0); |
| 22 assert_equals(getComputedStyle(audio).display, "none"); |
| 23 }); |
| 24 </script> |
OLD | NEW |