chromium/third_party/blink/web_tests/http/tests/security/media-element-audio-source-node-same-origin.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <script src="resources/webaudio/compatibility.js"></script>
    <script src="resources/webaudio/media-element-audio-source-node-test.js"></script>
    <script src="/js-test-resources/js-test.js"></script>
  </head>

  <body>
    <div id="description"></div>
    <div id="console"></div>

    <script>
      description("MediaElementAudioSourceNode with same-origin source");

      var src = "http://127.0.0.1:8000/security/resources/webaudio/laughter.wav";
      var data;

      function checkResult (e) {
        data = e.getChannelData(0);
        var count = 0;
        for (var k = 0; k < data.length; ++k) {
            if (data[k] != 0) {
                ++count;
            }
        }
        if (count > 0) {
            testPassed("Correctly found some non-zero values.");
        } else {
            testFailed("All samples incorrectly zeroed.");
        }
      }

      runTest(src, checkResult);

    </script>
  </body>
</html>