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

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

Issue 2657723002: [Blink, Media] Added controlsList to HTMLMediaElement (Closed)
Patch Set: Added layout tests 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 adding keywords to controlsList hides buttons</title>
mlamouri (slow - plz ping) 2017/03/03 10:38:41 Can you put the tests in the controls/ directory?
whywhat 2017/03/03 16:04:55 Done.
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 controls id="enabled-controls" width="500px"></video>
8 <script>
9 async_test(t => {
10 var v = document.getElementById('enabled-controls');
11
12 v.addEventListener('canplaythrough', t.step_func(e => {
13 assert_not_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
14 assert_not_equals(getComputedStyle(downloadButton(v)).display, 'none');
15
16 v.controlsList.add('nodownload');
mlamouri (slow - plz ping) 2017/03/03 10:38:41 By which mechanism does this create a re-layout of
whywhat 2017/03/03 16:04:55 Each time it changes, controlsList object tells HT
17
18 testRunner.layoutAndPaintAsyncThen(t.step_func(() => {
19 assert_not_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
20 assert_equals(getComputedStyle(downloadButton(v)).display, 'none');
21 v.controlsList.add('nofullscreen');
22
23 testRunner.layoutAndPaintAsyncThen(t.step_func_done(() => {
24 assert_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
25 assert_equals(getComputedStyle(downloadButton(v)).display, 'none');
26 }));
27 }));
28 }));
29
30 v.src = findMediaFile('video', 'resources/test');
31 }, 'Test disabling controls on the video element with all controls.');
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698