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

Unified Diff: third_party/WebKit/LayoutTests/media/controls/settings-disable-controls.html

Issue 2692903002: Don't show media controls when there is a persistent video. (Closed)
Patch Set: rebase Created 3 years, 10 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 | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/Settings.json5 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/controls/settings-disable-controls.html
diff --git a/third_party/WebKit/LayoutTests/media/controls/settings-disable-controls.html b/third_party/WebKit/LayoutTests/media/controls/settings-disable-controls.html
new file mode 100644
index 0000000000000000000000000000000000000000..5bd7c1153b9c6336874176f480d5a99156bb40fa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/controls/settings-disable-controls.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Test that 'mediaControlsEnabled' properly toggles the native controls</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../media-file.js"></script>
+<script src="../media-controls.js"></script>
+<video controls></video>
+<script>
+async_test(t => {
+ var video = document.querySelector('video');
+
+ internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
+ t.add_cleanup(() => {
+ internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false);
+ });
+
+ video.addEventListener('canplaythrough', t.step_func(e => {
+ assert_equals(overlayCastButton(video).style.display, "none");
+ assert_not_equals(mediaControlsButton(video, "panel").style.display, "none");
+
+ internals.settings.setMediaControlsEnabled(false);
+ testRunner.layoutAndPaintAsyncThen(t.step_func(() => {
+ assert_equals(mediaControlsButton(video, "panel").style.display, "none");
+ assert_equals(overlayCastButton(video).style.display, "none");
+
+ internals.settings.setMediaControlsEnabled(true);
+ testRunner.layoutAndPaintAsyncThen(t.step_func_done(() => {
+ assert_not_equals(mediaControlsButton(video, "panel").style.display, "none");
+ assert_equals(overlayCastButton(video).style.display, "none");
+ }));
+ }));
+ }));
+
+ video.src = findMediaFile('video', '../content/test');
+});
+</script>
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/Settings.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698