| <!DOCTYPE html> |
| <script src="../../../resources/js-test-pre.js"></script> |
| <body> |
| <script type="text/javascript"> |
| |
| description("Testing the <code><audio></code> controls metrics."); |
| |
| const defaultAudio = document.body.appendChild(document.createElement("audio")); |
| defaultAudio.controls = true; |
| |
| const shortAudio = document.body.appendChild(document.createElement("audio")); |
| shortAudio.style.height = "20px !important"; |
| shortAudio.controls = true; |
| |
| const tallAudio = document.body.appendChild(document.createElement("audio")); |
| tallAudio.style.height = "100px"; |
| tallAudio.controls = true; |
| |
| shouldBe("defaultAudio.getBoundingClientRect().width", "250"); |
| shouldBe("defaultAudio.getBoundingClientRect().height", "31"); |
| |
| shouldBe("shortAudio.getBoundingClientRect().width", "250"); |
| shouldBe("shortAudio.getBoundingClientRect().height", "31"); |
| |
| shouldBe("tallAudio.getBoundingClientRect().width", "250"); |
| shouldBe("tallAudio.getBoundingClientRect().height", "100"); |
| |
| debug(""); |
| defaultAudio.remove(); |
| shortAudio.remove(); |
| tallAudio.remove(); |
| |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |