-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Media Controls: Update preload=none state
Update preload=none state based on the new mocks. Also adds ShouldShow[Audio/Video]Controls to MediaControlsImpl to simplify the logic around which set of controls we should show. BUG=818659 No-Try: true Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: Ide3bed15161aa5e1e1096275212c718eacb24a77 Reviewed-on: https://chromium-review.googlesource.com/993757 Commit-Queue: Becca Hughes <beccahughes@chromium.org> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by: Tommy Steimel <steimel@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#550487}(cherry picked from commit 096153b) Reviewed-on: https://chromium-review.googlesource.com/1014181 Reviewed-by: Becca Hughes <beccahughes@chromium.org> Cr-Commit-Position: refs/branch-heads/3396@{#15} Cr-Branched-From: 9ef2aa8-refs/heads/master@{#550428}
- Loading branch information
1 parent
7b70b32
commit 883aaf5
Showing
7 changed files
with
87 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
third_party/WebKit/LayoutTests/media/controls/modern/overflow-button-disabled-no-source.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<title>Test that the overflow menu is shown but disabled with no source.</title> | ||
<script src="../../../resources/testharness.js"></script> | ||
<script src="../../../resources/testharnessreport.js"></script> | ||
<script src="../../media-controls.js"></script> | ||
<video controls width=400 controlsList=nodownload></video> | ||
<script> | ||
async_test(t => { | ||
const video = document.querySelector('video'); | ||
|
||
// Make sure the button is visible and disabled. | ||
assert_true(overflowButton(video).disabled); | ||
assert_equals('', overflowButton(video).style.display); | ||
|
||
// Set the source and start playing. | ||
video.src = '../../content/60_sec_video.webm'; | ||
video.play().then(t.step_func_done(() => { | ||
// Make sure the button has been hidden and is no longer disabled. | ||
assert_false(overflowButton(video).disabled); | ||
assert_equals('none', overflowButton(video).style.display); | ||
}), t.unreached_func()); | ||
}); | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
third_party/blink/renderer/modules/media_controls/resources/ic_no_source.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters