Index: third_party/WebKit/LayoutTests/media/video-controls-download-button-displayed.html |
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-download-button-displayed.html b/third_party/WebKit/LayoutTests/media/video-controls-download-button-displayed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d59478e338867df6ee0ee740dd38812fdce08606 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/media/video-controls-download-button-displayed.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
+<title>Download button should appear for videos that can be downloaded.</title> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script src="media-controls.js"></script> |
+<script src="media-file.js"></script> |
+<!--Padding ensures the overflow menu is visible for the tests. --> |
+<body style="padding-top: 200px; padding-left: 100px"> |
+<video controls></video> |
+<script> |
+async_test(function(t) { |
+ if (window.internals) |
+ window.internals.runtimeFlags.mediaControlsDownloadButtonEnabled = true; |
+ // Set up video |
+ var video = document.querySelector("video"); |
+ video.src = findMediaFile("video", "content/test"); |
+ var controlID = "-internal-download-button"; |
+ var downloadButton = mediaControlsElement(internals.shadowRoot(video).firstChild, controlID); |
+ video.onloadeddata = t.step_func_done(function() { |
+ assert_not_equals(getComputedStyle(downloadButton).display, "none"); |
+ }); |
+}); |
+</script> |
+</body> |