| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../resources/js-test.js"></script> |
| <script type="text/javascript" src="resources/audio-testing.js"></script> |
| </head> |
| <body> |
| <script> |
| description("Test that decoding an audio file which is too short does not cause a crash."); |
| |
| window.jsTestIsAsync = true; |
| |
| var context = new webkitAudioContext(); |
| var request = new XMLHttpRequest(); |
| request.open("GET", 'resources/media/too-short.m4a', true); |
| request.responseType = "arraybuffer"; |
| |
| request.onload = function() { |
| context.decodeAudioData(request.response, finishJSTest, finishJSTest); |
| } |
| request.send(); |
| |
| </script> |
| </body> |
| </html> |