Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-controls-no-scripting.html
blobce58a7f86635fe571cccc5ac9e13e7b979306f1a
1 <!doctype html>
2 <html>
3 <head>
4 <script src="video-test.js" type="text/javascript"></script>
5 <script>
6 function setup()
8 if (!window.testRunner) {
9 consoleWrite("This test only works in DRT.");
10 return;
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);
22 consoleWrite("");
23 endTest();
25 </script>
26 </head>
28 <body>
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>
34 <script>
35 document.getElementById("fr").onload = setup;
36 </script>
37 </body>
38 </html>