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

Side by Side Diff: LayoutTests/media/media-captions-no-controls.html

Issue 411833006: Use the mediaControlsButton() helper more in media tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/media/media-captions-no-controls-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 5
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 src=media-controls.js></script> 8 <script src=media-controls.js></script>
9 <script> 9 <script>
10 10
11 function canplaythrough() 11 function canplaythrough()
12 { 12 {
13 consoleWrite("<br>** Initial state: no text tracks, controls sho uld not be visible **"); 13 consoleWrite("<br>** Initial state: no text tracks, controls sho uld not be visible **");
14 testExpected("video.textTracks.length", 0); 14 testExpected("video.textTracks.length", 0);
15 testExpected("video.controls", false, '=='); 15 testExpected("video.controls", false, '==');
16 testExpected("internals.shadowRoot(video).firstChild", null); 16 testExpected("internals.shadowRoot(video).firstChild", null);
17 17
18 consoleWrite("<br>** Add a text track, controls should not becom e visible **"); 18 consoleWrite("<br>** Add a text track, controls should not becom e visible **");
19 run("video.addTextTrack('captions')"); 19 run("video.addTextTrack('captions')");
20 testExpected("video.textTracks.length", 1); 20 testExpected("video.textTracks.length", 1);
21 testExpected("video.controls", false); 21 testExpected("video.controls", false);
22 testExpected("internals.shadowRoot(video).firstChild", null); 22 testExpected("internals.shadowRoot(video).firstChild", null);
23 23
24 consoleWrite("<br>** Enable controls **"); 24 consoleWrite("<br>** Enable controls **");
25 run("video.setAttribute('controls','controls')"); 25 run("video.setAttribute('controls','controls')");
26 testExpected("video.textTracks.length", 1); 26 testExpected("video.textTracks.length", 1);
27 testExpected("video.controls", true); 27 testExpected("video.controls", true);
28 controlsElement = mediaControlsElement(internals.shadowRoot(vide o).firstChild, "-webkit-media-controls-panel"); 28 panel = mediaControlsButton(video, "panel");
29 testExpected("internals.shadowRoot(video).firstChild", null, "!= "); 29 testExpected("internals.shadowRoot(video).firstChild", null, "!= ");
30 testExpected("controlsElement.style['display']", 'none', "!="); 30 testExpected("panel.style['display']", 'none', "!=");
31 31
32 consoleWrite(""); 32 consoleWrite("");
33 endTest(); 33 endTest();
34 } 34 }
35 35
36 function start() 36 function start()
37 { 37 {
38 findMediaElement(); 38 findMediaElement();
39 39
40 waitForEvent('canplaythrough', canplaythrough); 40 waitForEvent('canplaythrough', canplaythrough);
41 video.src = findMediaFile("video", "content/test"); 41 video.src = findMediaFile("video", "content/test");
42 } 42 }
43 43
44 </script> 44 </script>
45 </head> 45 </head>
46 <body onload="start()"> 46 <body onload="start()">
47 <video> 47 <video>
48 </video> 48 </video>
49 <p>Tests that adding a text track does not make controls visible.</p> 49 <p>Tests that adding a text track does not make controls visible.</p>
50 </body> 50 </body>
51 </html> 51 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/media-captions-no-controls-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698