Changeset 123309 in webkit


Ignore:
Timestamp:
Jul 23, 2012 12:53:19 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Improve AudioChannelSplitter test
https://bugs.webkit.org/show_bug.cgi?id=91962

Patch by Li Yin <li.yin@intel.com> on 2012-07-23
Reviewed by Kentaro Hara.

Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioChannelSplitter-section
The numberOfOutputs parameter determines the number of outputs.
Values of up to 32 must be supported. If not specified, then 6 will be used.

  • webaudio/audiochannelsplitter-expected.txt:
  • webaudio/audiochannelsplitter.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r123306 r123309  
     12012-07-23  Li Yin  <li.yin@intel.com>
     2
     3        Improve AudioChannelSplitter test
     4        https://bugs.webkit.org/show_bug.cgi?id=91962
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioChannelSplitter-section
     9        The numberOfOutputs parameter determines the number of outputs.
     10        Values of up to 32 must be supported. If not specified, then 6 will be used.
     11
     12        * webaudio/audiochannelsplitter-expected.txt:
     13        * webaudio/audiochannelsplitter.html:
     14
    1152012-07-22  Li Yin  <li.yin@intel.com>
    216
  • trunk/LayoutTests/webaudio/audiochannelsplitter-expected.txt

    r113940 r123309  
    55PASS Exception been thrown for numberOfOutputs <= 0.
    66PASS Exception been thrown for numberOfOutputs >= 32.
     7PASS AudioChannelSplitter created successfully with numberOfOutputs = 32.
     8PASS AudioChannelSplitter has 32 outputs when it is created with numberOfOutputs = 32.
     9PASS AudioChannelSplitter has one input.
     10PASS AudioChannelSplitter created successfully with empty parameter.
     11PASS AudioChannelSplitter has 6 outputs when it is created with empty parameter.
    712PASS Correctly exchanged left and right channels.
    813PASS successfullyParsed is true
  • trunk/LayoutTests/webaudio/audiochannelsplitter.html

    r120521 r123309  
    9898    }
    9999
     100    try {
     101        var splitternode = context.createChannelSplitter(32);
     102        testPassed("AudioChannelSplitter created successfully with numberOfOutputs = 32.");
     103        if (splitternode.numberOfOutputs === 32)
     104            testPassed("AudioChannelSplitter has 32 outputs when it is created with numberOfOutputs = 32.");
     105        else
     106            testFailed("AudioChannelSplitter should have 32 outputs when it is created with numberOfOutputs = 32.");
     107
     108        if (splitternode.numberOfInputs === 1)
     109            testPassed("AudioChannelSplitter has one input.");
     110        else
     111            testFailed("AudioChannelSplitter should have one input.");
     112    } catch(e) {
     113        testFailed("Failed to create AudioChannelSplitter with numberOfInputs = 32.");
     114    }
     115
     116    try {
     117        var splitternode = context.createChannelSplitter();
     118        testPassed("AudioChannelSplitter created successfully with empty parameter.");
     119        if (splitternode.numberOfOutputs === 6)
     120            testPassed("AudioChannelSplitter has 6 outputs when it is created with empty parameter.");
     121        else
     122            testFailed("AudioChannelSplitter should have 6 outputs when it is created with empty parameter.");
     123    } catch(e) {
     124        testFailed("Failed to create AudioChannelSplitter with empty parameter.");
     125    }
     126
    100127    // Create a stereo buffer, with all +1 values in left channel, all -1 in right channel.
    101128    sourceBuffer = createStereoBufferWithDCOffset(lengthInSampleFrames, sampleRate, 1);
Note: See TracChangeset for help on using the changeset viewer.