| Index: tests/html/audiocontext_test.dart
|
| diff --git a/tests/html/audiocontext_test.dart b/tests/html/audiocontext_test.dart
|
| index 6e9e02cb14af64a883852389dec419521e4434c9..7305a0f3b4c0c4d81a87a0f5453e2341a5025f51 100644
|
| --- a/tests/html/audiocontext_test.dart
|
| +++ b/tests/html/audiocontext_test.dart
|
| @@ -9,7 +9,18 @@ main() {
|
|
|
| test('constructorTest', () {
|
| var ctx = new AudioContext();
|
| - Expect.isTrue(ctx != null);
|
| + Expect.isNotNull(ctx);
|
| Expect.isTrue(ctx is AudioContext);
|
| });
|
| + test('createBuffer', () {
|
| + var ctx = new AudioContext();
|
| + ArrayBufferView arrayBufferView = new Float32Array.fromList([]);
|
| + try {
|
| + // Test that native overload is chosen correctly. Native implementation
|
| + // should throw 'SYNTAX_ERR' DOMException because the buffer is empty.
|
| + AudioBuffer buffer = ctx.createBuffer(arrayBufferView.buffer, false);
|
| + } catch(var e) {
|
| + Expect.equals(DOMException.SYNTAX_ERR, e.code);
|
| + }
|
| + });
|
| }
|
|
|