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

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

Issue 363563007: Only show overlay play button when controls are enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@shouldShowControls
Patch Set: Extended test coverage Created 6 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-overlay-play-button-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Test that the overlay play button respects the controls attribute </title>
5 <script src="media-controls.js"></script>
6 <script src="media-file.js"></script>
7 <script src="video-test.js"></script>
8 <script>
9 function start()
10 {
11 window.internals.settings.setMediaControlsOverlayPlayButtonEnabl ed(true);
12
13 findMediaElement();
14
15 video.controls = true;
16
17 button = mediaControlsButton(video, 'overlay-play-button')
18 testExpected('getComputedStyle(button).display', 'flex');
19
20 waitForEventOnce('loadeddata', loadeddata);
21 video.src = findMediaFile('video', 'content/test');
22 }
23
24 function loadeddata()
25 {
26 waitForEventOnce('play', play1);
27 run('video.play()');
28 }
29
30 function play1()
31 {
32 testExpected('getComputedStyle(button).display', 'none');
33
34 waitForEventOnce('pause', pause1);
35 run('video.pause()');
36 }
37
38 function pause1()
39 {
40 testExpected('getComputedStyle(button).display', 'flex');
41
42 video.controls = false;
43 testExpected('getComputedStyle(button).display', 'none');
44
45 waitForEventOnce('play', play2);
46 run('video.play()');
47 }
48
49 function play2()
50 {
51 testExpected('getComputedStyle(button).display', 'none');
52
53 waitForEventOnce('pause', pause2);
54 run('video.pause()');
55 }
56
57 function pause2()
58 {
59 testExpected('getComputedStyle(button).display', 'none');
60
61 video.controls = true;
62 testExpected('getComputedStyle(button).display', 'flex');
63
64 endTest();
65 }
66 </script>
67 </head>
68 <body onload="start()">
69 <p>Test that the overlay play button respects the controls attribute</p>
70 <video></video>
71 </body>
72 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-overlay-play-button-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698