4 <script src=
"video-test.js" type=
"text/javascript"></script>
8 if (!window
.testRunner
) {
9 consoleWrite("This test only works in DRT.");
13 video
= document
.getElementById("fr").contentDocument
.querySelector("video");
14 testExpected("internals.shadowRoot(video)", null, "!=");
15 controls
= internals
.shadowRoot(video
).firstChild
.firstChild
;
17 // Don't use "testExpected()" for the control location because not all ports use the same size controls.
18 reportExpected((controls
.offsetTop
+ controls
.offsetHeight
) <= video
.offsetHeight
, "controls.offsetTop + controls.offsetHeight", "<=", "video.offsetHeight", controls
.offsetTop
+ controls
.offsetHeight
);
20 testExpected("getComputedStyle(controls).opacity", 1);
30 <iframe sandbox=
"allow-same-origin" src=
"resources/video-controls-no-scripting-iframe.html" id=
"fr" style=
"width: 400px; height: 320px; border: 1px solid black;"></iframe>
32 <p>Tests that the built-in controls are always enabled when JavaScript is disabled.
</p>
33 <pre id=
"console"></pre>
35 document
.getElementById("fr").onload
= setup
;