| Index: third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-add-hide.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-add-hide.html b/third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-add-hide.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ff3ec5545b6f7c81e44a4fb756f8510102919090
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/media/controls/controls-list-add-hide.html
|
| @@ -0,0 +1,32 @@
|
| +<!DOCTYPE html>
|
| +<title>Test adding keywords to controlsList hides 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 controls id="enabled-controls" width="500px"></video>
|
| +<script>
|
| +async_test(t => {
|
| + var v = document.getElementById('enabled-controls');
|
| +
|
| + v.addEventListener('canplaythrough', t.step_func(e => {
|
| + assert_not_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
|
| + assert_not_equals(getComputedStyle(downloadButton(v)).display, 'none');
|
| +
|
| + v.controlsList.add('nodownload');
|
| +
|
| + testRunner.layoutAndPaintAsyncThen(t.step_func(() => {
|
| + assert_not_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
|
| + assert_equals(getComputedStyle(downloadButton(v)).display, 'none');
|
| + v.controlsList.add('nofullscreen');
|
| +
|
| + testRunner.layoutAndPaintAsyncThen(t.step_func_done(() => {
|
| + assert_equals(getComputedStyle(fullscreenButton(v)).display, 'none');
|
| + assert_equals(getComputedStyle(downloadButton(v)).display, 'none');
|
| + }));
|
| + }));
|
| + }));
|
| +
|
| + v.src = findMediaFile('video', '../resources/test');
|
| +}, 'Test disabling controls on the video element with all controls.');
|
| +</script>
|
|
|