Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // The list of the 'own' properties in various AudioContexts. | |
| 2 // https://webaudio.github.io/web-audio-api/#BaseAudioContext | |
| 3 | |
| 4 | |
| 5 let BaseAudioContextOwnProperties = [ | |
| 6 'destination', | |
|
Raymond Toy
2016/10/03 20:19:20
Should this be alphabetical? Or maybe alphabetical
hongchan
2016/10/03 20:31:19
This is the order from the enumeration by the 'in'
| |
| 7 'currentTime', | |
| 8 'sampleRate', | |
| 9 'listener', | |
| 10 'state', | |
| 11 'onstatechange', | |
| 12 'createBuffer', | |
| 13 'decodeAudioData', | |
| 14 'createBufferSource', | |
| 15 'createGain', | |
| 16 'createDelay', | |
| 17 'createBiquadFilter', | |
| 18 'createIIRFilter', | |
| 19 'createWaveShaper', | |
| 20 'createPanner', | |
| 21 'createConvolver', | |
| 22 'createDynamicsCompressor', | |
| 23 'createAnalyser', | |
| 24 'createScriptProcessor', | |
| 25 'createStereoPanner', | |
| 26 'createOscillator', | |
| 27 'createPeriodicWave', | |
| 28 'createChannelSplitter', | |
| 29 'createChannelMerger', | |
| 30 'suspend', | |
| 31 'resume', | |
| 32 | |
| 33 // Not implemented yet: | |
| 34 // 'baseLatency', | |
| 35 // 'createConstantSource' | |
| 36 ]; | |
| 37 | |
| 38 | |
| 39 let AudioContextOwnProperties = [ | |
| 40 'close', | |
| 41 | |
| 42 // Not implemented yet: | |
| 43 // 'outputLatency', | |
| 44 // 'getOutputTimestamp', | |
| 45 | |
| 46 // These currently belong to BaseAudioContext. | |
| 47 // 'createMediaElementSource', | |
| 48 // 'createMediaStreamSource', | |
| 49 // 'createMediaStreamDestination', | |
| 50 ]; | |
| 51 | |
| 52 | |
| 53 let OfflineAudioContextOwnProperties = [ | |
| 54 'startRendering', | |
| 55 'suspend', | |
| 56 'length', | |
| 57 'oncomplete', | |
| 58 ]; | |
| 59 | |
| 60 | |
| 61 /** | |
| 62 * Check properties in the prototype of BaseAudioContext and its variants. | |
| 63 * @param {Object} config Test configuration object. | |
| 64 * @param {Object} config.targetPrototype Target prototype. | |
| 65 * @param {String} config.targetDescription String description of the target. | |
| 66 * @param {Array} config.propertyDict Property dictionary. | |
| 67 */ | |
| 68 function checkContextProperties (config, should) { | |
| 69 for (let index in config.propertyDict) { | |
| 70 var property = config.propertyDict[index]; | |
| 71 should( | |
| 72 config.targetDescription + '.hasOwnProperty("' + property + '")', | |
| 73 config.targetPrototype.hasOwnProperty(property)).beEqualTo(true); | |
| 74 } | |
| 75 } | |
| OLD | NEW |