OLD | NEW |
1 import 'dart:web_audio'; | 1 import 'dart:web_audio'; |
2 | 2 |
3 import 'package:minitest/minitest.dart'; | 3 import 'package:expect/minitest.dart'; |
4 | 4 |
5 main() { | 5 main() { |
6 group('supported', () { | 6 group('supported', () { |
7 test('supported', () { | 7 test('supported', () { |
8 expect(AudioContext.supported, isTrue); | 8 expect(AudioContext.supported, isTrue); |
9 }); | 9 }); |
10 }); | 10 }); |
11 | 11 |
12 group('functional', () { | 12 group('functional', () { |
13 test('createBuffer', () { | 13 test('createBuffer', () { |
14 if (AudioContext.supported) { | 14 if (AudioContext.supported) { |
15 var ctx = new AudioContext(); | 15 var ctx = new AudioContext(); |
16 AudioBufferSourceNode node = ctx.createBufferSource(); | 16 AudioBufferSourceNode node = ctx.createBufferSource(); |
17 expect(node is AudioBufferSourceNode, isTrue); | 17 expect(node is AudioBufferSourceNode, isTrue); |
18 node.start(ctx.currentTime, 0, 2); | 18 node.start(ctx.currentTime, 0, 2); |
19 expect(node is AudioBufferSourceNode, isTrue); | 19 expect(node is AudioBufferSourceNode, isTrue); |
20 } | 20 } |
21 }); | 21 }); |
22 }); | 22 }); |
23 } | 23 } |
OLD | NEW |