Commit b4331155 authored by Alison Maher's avatar Alison Maher Committed by Commit Bot

Video controls in forced colors mode

Video controls were broken in forced colors mode because
default_forced_color_style_ was not set in the case of media conrols.

Bug: 970285
Change-Id: I9e05335a893dbf8856c3093bcafa5d76beef268d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1778651Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarKevin Babbitt <kbabbitt@microsoft.com>
Commit-Queue: Alison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#693886}
parent 4408fb81
......@@ -231,6 +231,8 @@ bool CSSDefaultStyleSheets::EnsureDefaultStyleSheetsForElement(
default_style_->AddRulesFromSheet(MediaControlsStyleSheet(), ScreenEval());
default_print_style_->AddRulesFromSheet(MediaControlsStyleSheet(),
PrintEval());
default_forced_color_style_->AddRulesFromSheet(MediaControlsStyleSheet(),
ForcedColorsEval());
changed_default_style = true;
}
......
<!DOCTYPE html>
<html>
<head>
<title>Forced colors mode - video control.
Ensures that the video control is usable in forced colors mode.
</title>
<script src="../../../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script>
<script src="../../../../../media/media-controls.js"></script>
<video controls loop></video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
assert_true(video.controls);
video.oncanplaythrough = t.step_func_done(function() {
var playCoords = elementCoordinates(enabledPlayButton(video));
clickAtCoordinates(playCoords[0], playCoords[1]);
assert_false(video.paused);
});
video.src = "../../../../../media/content/test.ogv";
});
</script>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment