Index: LayoutTests/media/audio-controls-computed-display.html |
diff --git a/LayoutTests/media/audio-controls-computed-display.html b/LayoutTests/media/audio-controls-computed-display.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b83aa365c491dd7df418814078a3399e606aac71 |
--- /dev/null |
+++ b/LayoutTests/media/audio-controls-computed-display.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
+<title><audio> without controls has display:none irrespective of author CSS</title> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<style> |
+audio { |
+ display: inline !important; |
+} |
+</style> |
+<div id="log"></div> |
+<script> |
+test(function() { |
+ var audio = document.createElement('audio'); |
+ document.body.appendChild(audio); |
+ assert_equals(audio.clientWidth, 0); |
+ assert_equals(getComputedStyle(audio).display, "none"); |
+ audio.controls = true; |
+ assert_equals(audio.clientWidth, 300); |
+ assert_equals(getComputedStyle(audio).display, "inline"); |
+ audio.controls = false; |
+ assert_equals(audio.clientWidth, 0); |
+ assert_equals(getComputedStyle(audio).display, "none"); |
+}); |
+</script> |