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

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

Issue 2741933004: [Blink, Media] Added controlsList to HTMLMediaElement (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Test removing keywords from controlsList shows buttons</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../../media-resources/media-file.js"></script>
6 <script src="../../media-resources/media-controls.js"></script>
7 <video controlslist="nodownload nofullscreen" id="disabled-controls" width="500p x"></video>
8 <script>
9 async_test(t => {
10 var v = document.getElementById('disabled-controls');
11
12 v.addEventListener('canplaythrough', t.step_func(e => {
13 assert_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
14 assert_equals(getComputedStyle(downloadButton(v)).display, 'none');
15
16 v.controlsList.remove('nodownload');
17
18 testRunner.layoutAndPaintAsyncThen(t.step_func(() => {
19 assert_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
20 assert_not_equals(getComputedStyle(downloadButton(v)).display, 'none');
21
22 v.controlsList.remove('nofullscreen');
23
24 testRunner.layoutAndPaintAsyncThen(t.step_func_done(() => {
25 assert_not_equals(getComputedStyle(fullscreenButton(v)).display, 'none') ;
26 assert_not_equals(getComputedStyle(downloadButton(v)).display, 'none');
27 }));
28 }));
29 }));
30
31 v.src = findMediaFile('video', '../resources/test');
32 }, 'Test enabling controls on the video element with them enabled.');
33 </script>
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698