upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / media / audio-constructor-preload.html
1 <html>
2     <head>
3         <script src=media-file.js></script>
4         <script src=video-test.js></script>
5
6         <script>
7
8             function canplaythrough()
9             {
10                 consoleWrite("++ Test after 'canplaythrough' event");
11                 testExpected("mediaElement.getAttribute('preload')", "auto");
12                 testExpected("mediaElement.preload", "auto");
13                 endTest();
14             }
15
16             function start()
17             {
18                 run("mediaElement = new Audio()");
19                 consoleWrite("");
20
21                 consoleWrite("++ Test initial attribute value");
22                 testExpected("mediaElement.getAttribute('preload')", "auto");
23                 testExpected("mediaElement.preload", "auto");
24                 consoleWrite("");
25
26                 mediaElement.addEventListener("canplaythrough", canplaythrough);
27                 run("mediaElement.src = '" + findMediaFile("audio", "content/test") + "'");
28                 run("mediaElement.load()");
29
30                 consoleWrite("");
31             }
32
33         </script>
34     </head>
35
36     <body onload="start()">
37         <p>Test that Audio() sets 'preload' attribute.</p>
38     </body>
39 </html>