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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-remove-show.html

Issue 2657723002: [Blink, Media] Added controlsList to HTMLMediaElement (Closed)
Patch Set: Added a link to the spec. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-remove-show.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-remove-show.html b/third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-remove-show.html
new file mode 100644
index 0000000000000000000000000000000000000000..2244b722b985114a8f23e12a1433d0b676249d50
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-remove-show.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Test removing keywords from controlsList shows buttons</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../media-resources/media-file.js"></script>
+<script src="../../media-resources/media-controls.js"></script>
+<video controlslist="nodownload nofullscreen" id="disabled-controls" width="500px"></video>
+<script>
+async_test(t => {
+ var v = document.getElementById('disabled-controls');
+
+ v.addEventListener('canplaythrough', t.step_func(e => {
+ assert_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
+ assert_equals(getComputedStyle(downloadButton(v)).display, 'none');
+
+ v.controlsList.remove('nodownload');
+
+ testRunner.layoutAndPaintAsyncThen(t.step_func(() => {
+ assert_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
+ assert_not_equals(getComputedStyle(downloadButton(v)).display, 'none');
+
+ v.controlsList.remove('nofullscreen');
+
+ testRunner.layoutAndPaintAsyncThen(t.step_func_done(() => {
+ assert_not_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
+ assert_not_equals(getComputedStyle(downloadButton(v)).display, 'none');
+ }));
+ }));
+ }));
+
+ v.src = findMediaFile('video', '../resources/test');
+}, 'Test enabling controls on the video element with them enabled.');
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698