Skip to content

Commit 7d217d0

Browse files
author
Adam Barth
committed
Test how AudioBufferSourceNode reacts when given too few arguments
https://bugs.webkit.org/show_bug.cgi?id=65816 Reviewed by Sam Weinig. The WebAudio API is extremely new. It has only been available as an experimental API in a single browser. The compatibility cost of tightening up these APIs is tiny and these APIs make very little sense to call with too-few arguments. * webaudio/audionode-expected.txt: * webaudio/audionode.html: Canonical link: https://commits.webkit.org/81889@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 413b2ca commit 7d217d0

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

LayoutTests/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2011-08-10 Adam Barth <abarth@webkit.org>
2+
3+
Test how AudioBufferSourceNode reacts when given too few arguments
4+
https://bugs.webkit.org/show_bug.cgi?id=65816
5+
6+
Reviewed by Sam Weinig.
7+
8+
The WebAudio API is extremely new. It has only been available as an
9+
experimental API in a single browser. The compatibility cost of
10+
tightening up these APIs is tiny and these APIs make very little sense
11+
to call with too-few arguments.
12+
13+
* webaudio/audionode-expected.txt:
14+
* webaudio/audionode.html:
15+
116
2011-08-10 Adam Barth <abarth@webkit.org>
217

318
Add tests of optional arguments for Geolocation

LayoutTests/webaudio/audionode-expected.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ Basic tests for AudioNode API.
22

33
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
44

5+
PASS audioNode.noteOn() threw exception TypeError: Not enough arguments.
6+
PASS audioNode.noteGrainOn() threw exception TypeError: Not enough arguments.
7+
PASS audioNode.noteOff() threw exception TypeError: Not enough arguments.
58
PASS Source AudioNode has no inputs.
69
PASS Source AudioNode has one output.
710
PASS connect() exception thrown for illegal destination AudioNode.

LayoutTests/webaudio/audionode.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
window.jsTestIsAsync = true;
2626

2727
context = new webkitAudioContext();
28-
var audioNode = context.createBufferSource();
28+
window.audioNode = context.createBufferSource();
29+
30+
shouldThrow("audioNode.noteOn()");
31+
shouldThrow("audioNode.noteGrainOn()");
32+
shouldThrow("audioNode.noteOff()");
2933

3034
// Check number of inputs and outputs.
3135
if (audioNode.numberOfInputs == 0)

0 commit comments

Comments
 (0)