| Index: LayoutTests/media/audio-controls-style-invalidation.html
|
| diff --git a/LayoutTests/media/audio-controls-style-invalidation.html b/LayoutTests/media/audio-controls-style-invalidation.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b52652585781e048f849b8333b308327884c3aed
|
| --- /dev/null
|
| +++ b/LayoutTests/media/audio-controls-style-invalidation.html
|
| @@ -0,0 +1,25 @@
|
| +<!DOCTYPE html>
|
| +<title>Style invalidation when adding/removing audio controls</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<div id="log"></div>
|
| +<script>
|
| +test(function() {
|
| + var audio = document.createElement('audio');
|
| + document.body.appendChild(audio);
|
| + // Note: The clientWidth getter in this assert will force a layout.
|
| + // Without that, the test would pass for the wrong reasons.
|
| + assert_equals(audio.clientWidth, 0);
|
| + audio.controls = true;
|
| + assert_equals(audio.clientWidth, 300);
|
| +}, "Style invalidation when adding audio controls");
|
| +
|
| +test(function() {
|
| + var audio = document.createElement('audio');
|
| + document.body.appendChild(audio);
|
| + audio.controls = true;
|
| + assert_equals(audio.clientWidth, 300);
|
| + audio.controls = false;
|
| + assert_equals(audio.clientWidth, 0);
|
| +}, "Style invalidation when removing audio controls");
|
| +</script>
|
|
|