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

Side by Side Diff: LayoutTests/media/video-controls-overlay-play-button.html

Issue 291163004: Implement media cast buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reenable previously crashing tests - now fixed Created 6 years, 3 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
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test that the overlay play button respects the controls attribute </title> 4 <title>Test that the overlay play button respects the controls attribute </title>
5 <script src="media-controls.js"></script> 5 <script src="media-controls.js"></script>
6 <script src="media-file.js"></script> 6 <script src="media-file.js"></script>
7 <script src="video-test.js"></script> 7 <script src="video-test.js"></script>
8 <script> 8 <script>
9 function start() 9 function start()
10 { 10 {
11 window.internals.settings.setMediaControlsOverlayPlayButtonEnabl ed(true); 11 window.internals.settings.setMediaControlsOverlayPlayButtonEnabl ed(true);
12 12
13 // Add element dynamically, since otherwise the controls are cre ated, but
14 // hidden, before the setting is set, causing the setting to be ignored.
15 addVideoElement();
16
13 findMediaElement(); 17 findMediaElement();
14 18
15 video.controls = true; 19 video.controls = true;
16 20
17 button = mediaControlsButton(video, 'overlay-play-button') 21 button = mediaControlsButton(video, 'overlay-play-button')
18 testExpected('getComputedStyle(button).display', 'flex'); 22 testExpected('getComputedStyle(button).display', 'flex');
19 23
20 waitForEventOnce('loadeddata', loadeddata); 24 waitForEventOnce('loadeddata', loadeddata);
21 video.src = findMediaFile('video', 'content/test'); 25 video.src = findMediaFile('video', 'content/test');
22 } 26 }
23 27
28 function addVideoElement() {
29 element = document.createElement('video');
30 document.body.appendChild(element);
31 }
32
24 function loadeddata() 33 function loadeddata()
25 { 34 {
26 waitForEventOnce('play', play1); 35 waitForEventOnce('play', play1);
27 run('video.play()'); 36 run('video.play()');
28 } 37 }
29 38
30 function play1() 39 function play1()
31 { 40 {
32 testExpected('getComputedStyle(button).display', 'none'); 41 testExpected('getComputedStyle(button).display', 'none');
33 42
(...skipping 26 matching lines...) Expand all
60 69
61 video.controls = true; 70 video.controls = true;
62 testExpected('getComputedStyle(button).display', 'flex'); 71 testExpected('getComputedStyle(button).display', 'flex');
63 72
64 endTest(); 73 endTest();
65 } 74 }
66 </script> 75 </script>
67 </head> 76 </head>
68 <body onload="start()"> 77 <body onload="start()">
69 <p>Test that the overlay play button respects the controls attribute</p> 78 <p>Test that the overlay play button respects the controls attribute</p>
70 <video></video>
71 </body> 79 </body>
72 </html> 80 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/media-captions-no-controls.html ('k') | Source/core/accessibility/AXMediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698