1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
4 <script src=
"resources/webaudio/compatibility.js"></script>
5 <script src=
"resources/webaudio/media-element-audio-source-node-test.js"></script>
6 <script src=
"/js-test-resources/js-test.js"></script>
10 <div id=
"description"></div>
11 <div id=
"console"></div>
14 description("MediaElementAudioSourceNode with cross-origin source");
16 var src
= "http://localhost:8000/security/resources/webaudio/laughter.wav";
19 function checkResult (e
) {
20 data
= e
.renderedBuffer
.getChannelData(0);
23 // Count the number of non-zero values. Since this is a cross-origin source, all the values
25 for (var k
= 0; k
< data
.length
; ++k
) {
31 testFailed("Expected all zeros but found " + count
+ " non-zero values out of " + data
.length
+ ".");
33 testPassed("All samples correctly zeroed.");
37 runTest(src
, checkResult
);