| <html> |
| <head> |
| <script src=media-file.js></script> |
| <script src=video-test.js></script> |
| |
| <script> |
| |
| function canplaythrough() |
| { |
| consoleWrite("++ Test after 'canplaythrough' event"); |
| testExpected("mediaElement.getAttribute('preload')", "auto"); |
| testExpected("mediaElement.preload", "auto"); |
| endTest(); |
| } |
| |
| function start() |
| { |
| run("mediaElement = new Audio()"); |
| consoleWrite(""); |
| |
| consoleWrite("++ Test initial attribute value"); |
| testExpected("mediaElement.getAttribute('preload')", "auto"); |
| testExpected("mediaElement.preload", "auto"); |
| consoleWrite(""); |
| |
| mediaElement.addEventListener("canplaythrough", canplaythrough); |
| run("mediaElement.src = '" + findMediaFile("audio", "content/test") + "'"); |
| run("mediaElement.load()"); |
| |
| consoleWrite(""); |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="start()"> |
| <p>Test that Audio() sets 'preload' attribute.</p> |
| </body> |
| </html> |