| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 5 (Please avoid writing new tests using video-test.js) --> |
| 4 <script src="video-test.js" type="text/javascript"></script> | 6 <script src="video-test.js" type="text/javascript"></script> |
| 5 <script> | 7 <script> |
| 6 function setup() | 8 function setup() |
| 7 { | 9 { |
| 8 if (!window.testRunner) { | 10 if (!window.testRunner) { |
| 9 consoleWrite("This test only works in DRT."); | 11 consoleWrite("This test only works in DRT."); |
| 10 return; | 12 return; |
| 11 } | 13 } |
| 12 | 14 |
| 13 video = document.getElementById("fr").contentDocument.querySelector(
"video"); | 15 video = document.getElementById("fr").contentDocument.querySelector(
"video"); |
| 14 testExpected("internals.shadowRoot(video)", null, "!="); | 16 testExpected("internals.shadowRoot(video)", null, "!="); |
| 15 controls = internals.shadowRoot(video).firstChild.firstChild; | 17 controls = internals.shadowRoot(video).firstChild.firstChild; |
| 16 | 18 |
| 17 // Don't use "testExpected()" for the control location because not a
ll ports use the same size controls. | 19 // Don't use "testExpected()" for the control location because not a
ll ports use the same size controls. |
| 18 reportExpected((controls.offsetTop + controls.offsetHeight) <= video
.offsetHeight, "controls.offsetTop + controls.offsetHeight", "<=", "video.offset
Height", controls.offsetTop + controls.offsetHeight); | 20 reportExpected((controls.offsetTop + controls.offsetHeight) <= video
.offsetHeight, "controls.offsetTop + controls.offsetHeight", "<=", "video.offset
Height", controls.offsetTop + controls.offsetHeight); |
| 19 | 21 |
| 20 testExpected("getComputedStyle(controls).opacity", 1); | 22 testExpected("getComputedStyle(controls).opacity", 1); |
| 21 | 23 |
| 22 consoleWrite(""); | 24 consoleWrite(""); |
| 23 endTest(); | 25 endTest(); |
| 24 } | 26 } |
| 25 </script> | 27 </script> |
| 26 </head> | 28 </head> |
| 27 | 29 |
| 28 <body> | 30 <body> |
| 29 | 31 |
| 30 <iframe sandbox="allow-same-origin" src="resources/video-controls-no-scr
ipting-iframe.html" id="fr" style="width: 400px; height: 320px; border: 1px soli
d black;"></iframe> | 32 <iframe sandbox="allow-same-origin" src="resources/video-controls-no-scr
ipting-iframe.html" id="fr" style="width: 400px; height: 320px; border: 1px soli
d black;"></iframe> |
| 31 | 33 |
| 32 <p>Tests that the built-in controls are always enabled when JavaScript i
s disabled.</p> | 34 <p>Tests that the built-in controls are always enabled when JavaScript i
s disabled.</p> |
| 33 <pre id="console"></pre> | 35 <pre id="console"></pre> |
| 34 <script> | 36 <script> |
| 35 document.getElementById("fr").onload = setup; | 37 document.getElementById("fr").onload = setup; |
| 36 </script> | 38 </script> |
| 37 </body> | 39 </body> |
| 38 </html> | 40 </html> |
| OLD | NEW |