| OLD | NEW | 
|   1 <!DOCTYPE html> |   1 <!DOCTYPE html> | 
|   2 <html> |   2 <html> | 
|   3 <head> |   3 <head> | 
|   4 <script src="../resources/js-test.js"></script> |   4 <script src="../resources/js-test.js"></script> | 
 |   5 <script src="resources/compatibility.js"></script> | 
|   5 <script type="text/javascript" src="resources/audio-testing.js"></script> |   6 <script type="text/javascript" src="resources/audio-testing.js"></script> | 
|   6 </head> |   7 </head> | 
|   7 <body> |   8 <body> | 
|   8 <script> |   9 <script> | 
|   9 description("Basic tests for decodeAudioData function."); |  10 description("Basic tests for decodeAudioData function."); | 
|  10  |  11  | 
|  11 if (window.testRunner) { |  12 if (window.testRunner) { | 
|  12     testRunner.dumpAsText(); |  13     testRunner.dumpAsText(); | 
|  13     testRunner.waitUntilDone(); |  14     testRunner.waitUntilDone(); | 
|  14 } |  15 } | 
|  15      |  16      | 
|  16 window.jsTestIsAsync = true; |  17 window.jsTestIsAsync = true; | 
|  17  |  18  | 
|  18 var context = new webkitAudioContext(); |  19 var context = new AudioContext(); | 
|  19  |  20  | 
|  20 try { |  21 try { | 
|  21     context.decodeAudioData(null, function(){}, function(){}); |  22     context.decodeAudioData(null, function(){}, function(){}); | 
|  22     testFailed("decodeAudioData should raise exception when arraybuffer paramete
    r is null."); |  23     testFailed("decodeAudioData should raise exception when arraybuffer paramete
    r is null."); | 
|  23 } catch(e) { |  24 } catch(e) { | 
|  24     testPassed("decodeAudioData raises exception correctly when arraybuffer para
    meter is null."); |  25     testPassed("decodeAudioData raises exception correctly when arraybuffer para
    meter is null."); | 
|  25 } |  26 } | 
|  26  |  27  | 
|  27 var decodeCaseArray = [{url: "resources/media/24bit-44khz.wav", result: true}, |  28 var decodeCaseArray = [{url: "resources/media/24bit-44khz.wav", result: true}, | 
|  28                        {url: "resources/media/invalid-audio-file.txt", result: f
    alse}]; |  29                        {url: "resources/media/invalid-audio-file.txt", result: f
    alse}]; | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
|  59         } |  60         } | 
|  60     } |  61     } | 
|  61     request.send(); |  62     request.send(); | 
|  62 } |  63 } | 
|  63  |  64  | 
|  64 runDecodeTest(0); |  65 runDecodeTest(0); | 
|  65  |  66  | 
|  66 </script> |  67 </script> | 
|  67 </body> |  68 </body> | 
|  68 </html> |  69 </html> | 
| OLD | NEW |