[Modern Media Controls] Turn media/modern-media-controls/ios-inline-media-controls...
[WebKit-https.git] / LayoutTests / media / video-load-preload-none.html
1 <html>
2     <head>
3         <script src="media-file.js"></script>
4         <script src="video-test.js"></script>
5         <script>
6             function start()
7             {
8                 findMediaElement();
9                 video.src = findMediaFile("video", "content/test");
10
11                 testExpected("video.preload", "none");
12                 testExpected("video.readyState", HTMLMediaElement.HAVE_NOTHING);
13                 waitForEventAndEnd('loadedmetadata');
14
15                 // Wait 250ms before load()ing to make sure setting src does not kick off the load
16                 // (i.e. preload=none should still be respected).
17                 setTimeout(load, 250);
18             }
19             function load()
20             {
21                 testExpected("video.readyState", HTMLMediaElement.HAVE_NOTHING);
22                 run("video.load()");
23             }
24         </script>
25     </head>
26
27     <body>
28         <video preload="none"></video>
29         <p>Test that an explicit load() to a media element whose preload is set to "none" still loads the video.</p>
30         <script>start();</script>
31     </body>
32 </html>