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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>media controls download button preload none</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../media-file.js"></script>
6 <script src="../media-controls.js"></script>
7 <video controls preload="none" src="https://someexample.example/example.mp4"></v ideo>
8 <script>
9 async_test(function(t) {
10 var video = document.querySelector("video");
11
12 testRunner.layoutAndPaintAsyncThen(t.step_func_done(function() {
13 assert_true(isVisible(downloadButton(video)));
14 }));
15
16 function downloadButton(videoElement) {
17 var controlID = '-internal-media-controls-download-button';
18 var button = mediaControlsElement(
19 window.internals.shadowRoot(videoElement).firstChild, controlID);
20 if (!button)
21 throw 'Failed to find download button';
22 return button;
23 }
24
25 function isVisible(button) {
26 var computedStyle = getComputedStyle(button);
27 return computedStyle.display !== "none" &&
28 computedStyle.visibility === "visible";
29 }
30 });
31 </script>
OLDNEW
« 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