| Index: tests/html/audiocontext_test.dart
|
| diff --git a/tests/html/audiocontext_test.dart b/tests/html/audiocontext_test.dart
|
| index 33a7907181e09937bb7bcd291cbb7fd9a9700223..bcb0c8ab258443d9d9034c9000ef5efd98843b9d 100644
|
| --- a/tests/html/audiocontext_test.dart
|
| +++ b/tests/html/audiocontext_test.dart
|
| @@ -3,6 +3,7 @@ import '../../pkg/unittest/lib/unittest.dart';
|
| import '../../pkg/unittest/lib/html_config.dart';
|
| import 'dart:html';
|
| import 'dart:web_audio';
|
| +import 'dart:async';
|
|
|
| main() {
|
|
|
| @@ -41,4 +42,19 @@ main() {
|
| expect(context.createPanner() is PannerNode, isTrue);
|
| expect(context.createScriptProcessor(4096) is ScriptProcessorNode, isTrue);
|
| });
|
| +
|
| + test('onAudioProcess', () {
|
| + var context = new AudioContext();
|
| + var scriptProcessor = context.createScriptProcessor(1024, 1, 2);
|
| + scriptProcessor.connect(context.destination, 0, 0);
|
| + var completer = new Completer<bool>();
|
| + bool alreadyCalled = false;
|
| + scriptProcessor.onAudioProcess = (event) {
|
| + if (!alreadyCalled) {
|
| + completer.complete(true);
|
| + }
|
| + alreadyCalled = true;
|
| + };
|
| + return completer.future;
|
| + });
|
| }
|
|
|