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

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: 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>media controls cast button</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 }));
mlamouri (slow - plz ping) 2017/03/04 14:10:01 What would happen if preload kicks in? Does the do
steimel 2017/03/06 17:44:12 Fixed to make the button disappear when preload ki
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

Powered by Google App Engine
This is Rietveld 408576698