tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

audiobuffersource-basic.html (1134B)


      1 <!doctype html>
      2 <html>
      3  <head>
      4    <title>
      5      Basic Test of AudioBufferSourceNode
      6    </title>
      7    <script src="/resources/testharness.js"></script>
      8    <script src="/resources/testharnessreport.js"></script>
      9    <script src="/webaudio/resources/audit-util.js"></script>
     10    <script src="/webaudio/resources/audit.js"></script>
     11    <script src="/webaudio/resources/start-stop-exceptions.js"></script>
     12  </head>
     13    <script id="layout-test-code">
     14      let sampleRate = 44100;
     15      let renderLengthSeconds = 0.25;
     16 
     17      let oscTypes = ['sine', 'square', 'sawtooth', 'triangle', 'custom'];
     18 
     19      let audit = Audit.createTaskRunner();
     20 
     21      audit.define('start/stop exceptions', (task, should) => {
     22        // We're not going to render anything, so make it simple
     23        let context = new OfflineAudioContext(1, 1, sampleRate);
     24        let node = new AudioBufferSourceNode(context);
     25 
     26        testStartStop(should, node, [
     27          {args: [0, -1], errorType: RangeError},
     28          {args: [0, 0, -1], errorType: RangeError}
     29        ]);
     30        task.done();
     31      });
     32 
     33      audit.run();
     34    </script>
     35  <body>
     36  </body>
     37 </html>