Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: third_party/WebKit/LayoutTests/media/controls/download-button-displays-with-preload-none.html

Issue 2728193003: Show download button even when preload=none (Closed)
Patch Set: mlamouri feedback Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698