| Index: third_party/WebKit/LayoutTests/media/controls/download-button-displays-with-preload-none.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/controls/download-button-displays-with-preload-none.html b/third_party/WebKit/LayoutTests/media/controls/download-button-displays-with-preload-none.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..910af211b238483f9d4af7feeeb5f3ecac1e7975
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/media/controls/download-button-displays-with-preload-none.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE html>
|
| +<title>media controls download button preload none</title>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../media-file.js"></script>
|
| +<script src="../media-controls.js"></script>
|
| +<video controls preload="none" src="https://someexample.example/example.mp4"></video>
|
| +<script>
|
| +async_test(function(t) {
|
| + var video = document.querySelector("video");
|
| +
|
| + testRunner.layoutAndPaintAsyncThen(t.step_func_done(function() {
|
| + assert_true(isVisible(downloadButton(video)));
|
| + }));
|
| +
|
| + function downloadButton(videoElement) {
|
| + var controlID = '-internal-media-controls-download-button';
|
| + var button = mediaControlsElement(
|
| + window.internals.shadowRoot(videoElement).firstChild, controlID);
|
| + if (!button)
|
| + throw 'Failed to find download button';
|
| + return button;
|
| + }
|
| +
|
| + function isVisible(button) {
|
| + var computedStyle = getComputedStyle(button);
|
| + return computedStyle.display !== "none" &&
|
| + computedStyle.visibility === "visible";
|
| + }
|
| +});
|
| +</script>
|
|
|