Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/resources/context-properties.js

Issue 2386303002: Expose BaseAudioContext prototype (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 'createAnalyser',
7 'createBiquadFilter',
8 'createBuffer',
9 'createBufferSource',
10 'createChannelMerger',
11 'createChannelSplitter',
12 'createConvolver',
13 'createDelay',
14 'createDynamicsCompressor',
15 'createGain',
16 'createIIRFilter',
17 'createOscillator',
18 'createPanner',
19 'createPeriodicWave',
20 'createScriptProcessor',
21 'createStereoPanner',
22 'createWaveShaper',
23 'currentTime',
24 'decodeAudioData',
25 'destination',
26 'listener',
27 'onstatechange',
28 'resume',
29 'sampleRate',
30 'state',
31 'suspend',
32
33 // TODO(hongchan): Not implemented yet.
34 // 'baseLatency',
35 // 'createConstantSource'
Raymond Toy 2016/11/02 22:10:09 This should be available now. Also, I think that
hongchan 2016/11/02 22:46:50 Done.
36 ];
37
38
39 let AudioContextOwnProperties = [
40 'close',
41
42 // TODO(hongchan): Not implemented yet.
43 // 'outputLatency',
44 // 'getOutputTimestamp',
45
46 // TODO(hongchan): These currently belong to BaseAudioContext.
47 // 'createMediaElementSource',
48 // 'createMediaStreamSource',
49 // 'createMediaStreamDestination',
50 ];
51
52
53 let OfflineAudioContextOwnProperties = [
54 'length',
55 'oncomplete',
56 'startRendering',
57
58 // TODO(hongchan): OAC's suspend is different from the BAC but the interface
Raymond Toy 2016/11/02 22:10:09 "BAC"?
hongchan 2016/11/02 22:46:50 BaseAudioContext.
Raymond Toy 2016/11/02 23:01:07 Let's not use abbreviations.
59 // name is identical. So we have to leave this one out of the batch
60 // comparison.
61 // 'suspend',
62 ];
63
64
65 /**
66 * Check properties in the prototype of BaseAudioContext and its variants.
67 * @param {Object} config Test configuration object.
68 * @param {Object} config.targetPrototype Target prototype.
69 * @param {String} config.targetDescription String description of the target.
70 * @param {Boolean} config.expected Expected test result.
71 * @param {Array} config.propertyDict Property dictionary.
72 */
73 function checkContextProperties (config, should) {
74 for (let index in config.propertyDict) {
75 var property = config.propertyDict[index];
76 should(
77 config.targetDescription + '.hasOwnProperty("' + property + '")',
78 config.targetPrototype.hasOwnProperty(property))
79 .beEqualTo(config.expected);
80 }
81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698