4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <script src=media-file.js></script>
7 <script src=video-test.js></script>
8 <script src=media-controls.js></script>
11 function canplaythrough()
13 consoleWrite("<br>** Initial state: no text tracks, controls should not be visible **");
14 testExpected("video.textTracks.length", 0);
15 testExpected("video.controls", false, '==');
17 consoleWrite("<br>** Add a text track, controls should not become visible **");
18 run("video.addTextTrack('captions')");
19 testExpected("video.textTracks.length", 1);
20 testExpected("video.controls", false);
22 consoleWrite("<br>** Enable controls **");
23 run("video.setAttribute('controls','controls')");
24 testExpected("video.textTracks.length", 1);
25 testExpected("video.controls", true);
26 panel = mediaControlsButton(video, "panel");
27 testExpected("internals.shadowRoot(video).firstChild", null, "!=");
28 testExpected("panel.style['display']", 'none', "!=");
38 waitForEvent('canplaythrough', canplaythrough);
39 video.src = findMediaFile("video", "content/test");
44 <body onload="start()">
47 <p>Tests that adding a text track does not make controls visible.</p>