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

Unified Diff: LayoutTests/media/video-controls-hidden-audio.html

Issue 1303553003: Enable mute button, even if preferring hidden volume slider. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixed test... which is why we have them. Created 5 years, 4 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 | LayoutTests/media/video-controls-hidden-audio-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-controls-hidden-audio.html
diff --git a/LayoutTests/media/video-controls-hidden-audio.html b/LayoutTests/media/video-controls-hidden-audio.html
index 1eb707f83de764733fd6f70fb1ebeb1c34af475c..c694a61a97052a93a5e40f9639e088db1366b234 100644
--- a/LayoutTests/media/video-controls-hidden-audio.html
+++ b/LayoutTests/media/video-controls-hidden-audio.html
@@ -9,7 +9,7 @@
waitForEvent("canplaythrough", function () {
// Enable hidden audio preferences to take effect.
run("window.internals.setAllowHiddenVolumeControls(video, true)");
- // Request non-hidden audio.
+ // Request non-hidden audio controls.
run("window.internals.settings.setPreferHiddenVolumeControls(false)");
run("video.muted = false");
muteButton = mediaControlsButton(video, "mute-button");
@@ -19,11 +19,8 @@
testExpected("getComputedStyle(muteButton).display", "none", '!=');
testExpected("getComputedStyle(volumeSlider).display", "none", '!=');
- // Switch to muted video. Both should still be visible. We then
- // remind it that we'd like to allow hidden audio preferences, since
- // that also resets some state.
+ // Switch to muted video. Both should still be visible.
run("video.muted = true");
- run("window.internals.setAllowHiddenVolumeControls(video, true)");
testExpected("getComputedStyle(muteButton).display", "none", '!=');
testExpected("getComputedStyle(volumeSlider).display", "none", '!=');
@@ -31,15 +28,14 @@
// Switch back to unmuted video.
run("video.muted = false");
- run("window.internals.setAllowHiddenVolumeControls(video, true)");
- testExpected("getComputedStyle(muteButton).display", "none", '==');
+ testExpected("getComputedStyle(muteButton).display", "none", '!=');
testExpected("getComputedStyle(volumeSlider).display", "none", '==');
// For muted video, the volume slider will hide but the mute
- // button should come back, to let the user unmute.
+ // button should stay, since we always have it present for media
+ // which have audio.
run("video.muted = true");
- run("window.internals.setAllowHiddenVolumeControls(video, true)");
testExpected("getComputedStyle(muteButton).display", "none", '!=');
testExpected("getComputedStyle(volumeSlider).display", "none", '==');
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-hidden-audio-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698