Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="resources/webaudio/compatibility.js"></script> | |
| 5 <script src="resources/webaudio/media-element-audio-source-node-test.js"></s cript> | |
| 6 <script src="resources/webaudio/js-test.js"></script> | |
| 7 </head> | |
| 8 | |
| 9 <body> | |
| 10 <div id="description"></div> | |
| 11 <div id="console"></div> | |
| 12 | |
| 13 <script> | |
| 14 description("MediaElementAudioSourceNode with cross-origin source with cre dentials"); | |
| 15 | |
| 16 var data; | |
| 17 | |
| 18 function checkResult (e) { | |
| 19 data = e.renderedBuffer.getChannelData(0); | |
| 20 var count = 0; | |
| 21 | |
| 22 // Count the number of non-zero values. Since this is a cross-origin sou rce, all the values | |
| 23 // should be zero. | |
|
Ken Russell (switch to Gerrit)
2015/02/04 01:28:19
This comment is wrong for this test.
| |
| 24 for (var k = 0; k < data.length; ++k) { | |
| 25 if (data[k] != 0) { | |
| 26 ++count; | |
| 27 } | |
| 28 } | |
| 29 if (count > 0) { | |
| 30 testPassed("Correctly found some non-zero values."); | |
| 31 } else { | |
| 32 testFailed("All samples incorrectly zeroed."); | |
| 33 } | |
| 34 } | |
| 35 | |
| 36 function testFunction() { | |
| 37 audio.crossOrigin = "use-credentials"; | |
| 38 audio.src = | |
| 39 "http://localhost:8000/security/resources/webaudio/media-element-cross-o rigin-allow.php?with_credentials"; | |
| 40 } | |
| 41 | |
| 42 runTest(null, checkResult, testFunction); | |
| 43 | |
| 44 </script> | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |