Index: tests/html/audiocontext_test.dart |
diff --git a/tests/html/audiocontext_test.dart b/tests/html/audiocontext_test.dart |
index 318332b69e962b6c60f74db7ad0c3fc564d43afd..68c2af9a9fdade2d3b71fbf0c6b56ea036c7a418 100644 |
--- a/tests/html/audiocontext_test.dart |
+++ b/tests/html/audiocontext_test.dart |
@@ -20,17 +20,20 @@ main() { |
}); |
group('functional', () { |
+ var context; |
terry
2015/01/23 19:58:09
This doesn't need to be broken out? Assumed this
Alan Knight
2015/01/23 20:15:01
When I made too many different tests you started g
|
+ if (AudioContext.supported) { |
+ context = new AudioContext(); |
+ } |
+ |
test('constructorTest', () { |
if(AudioContext.supported) { |
- var ctx = new AudioContext(); |
- expect(ctx, isNotNull); |
- expect(ctx, isAudioContext); |
+ expect(context, isNotNull); |
+ expect(context, isAudioContext); |
} |
}); |
test('audioRenames', () { |
if(AudioContext.supported) { |
- AudioContext context = new AudioContext(); |
GainNode gainNode = context.createGain(); |
gainNode.connectNode(context.destination); |
expect(gainNode is GainNode, isTrue); |
@@ -67,7 +70,6 @@ main() { |
test('oscillatorTypes', () { |
if(AudioContext.supported) { |
- AudioContext context = new AudioContext(); |
OscillatorNode oscillator = context.createOscillator(); |
oscillator.connectNode(context.destination); |