| <!doctype html> |
| <html> |
| <head> |
| <title>audio.error - MEDIA_ERR_SRC_NOT_SUPPORTED constant is 4</title> |
| <script src="../../w3cwrapper.js"></script> |
| </head> |
| <body> |
| <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-media-error">spec reference</a></p> |
| <audio id="a" src="." onerror="test_error()"> |
| </audio> |
| <div id="log"></div> |
| <script> |
| var t = async_test("audioElement.onerror is triggered on bogus source"); |
| function test_error() { |
| var v = document.getElementById("a"); |
| t.step(function() { |
| assert_equals( |
| v.error.code, |
| 4, |
| "audioElement.error MEDIA_ERR_SRC_NOT_SUPPORTED constant is 4"); |
| }); |
| t.done(); |
| } |
| </script> |
| </body> |
| </html> |