[Modern Media Controls] Turn media/modern-media-controls/ios-inline-media-controls...
[WebKit-https.git] / LayoutTests / media / video-controls-to-not-scroll-page-on-load.html
1 <!DOCTYPE html>
2 <html>
3 <body onload="testScroll()">
4 <div style="width: 256px; height: 2096px; background-color: blue"></div> <!-- Dummy content to help make the page scrollable vertically. -->
5 <video src="non-existent.mov" style="width: 256px; height: 256px; background-color: yellow">
6     <track src="non-existent.vtt" kind="captions"></track>
7 </video>
8
9 <div id="result">FAILED: Test did not run.</div>
10
11 <script>
12
13 if (window.testRunner) {
14     testRunner.dumpAsText();
15     testRunner.waitUntilDone();
16 }
17
18 var result = document.getElementById("result");
19
20 result.innerHTML = "";
21
22 function testScroll () {
23         result.innerHTML += (document.body.scrollTop <= 0)? `PASS`: `FAILED: ${document.body.scrollTop} > 0, the page scrolled automatically.`;
24
25         testRunner.notifyDone();
26 }
27 </script>
28 </body>
29 </html>