Bug 591847 - Don't test audio write API when the audio hardware is disabled. a=test-fix

This commit is contained in:
Chris Pearce 2010-08-30 15:19:48 +12:00
Родитель 316f3633c3
Коммит 7225c147d6
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -21,7 +21,13 @@ var rate = 44100;
function runTests() {
var a1 = new Audio();
a1.mozSetup(channels, rate);
try {
a1.mozSetup(channels, rate);
} catch (ex) {
todo(false, "Audio hardware is disabled, can't test audio write API");
SimpleTest.finish();
return;
}
is(a1.mozChannels, channels, "mozChannels should be " + channels + ".");
is(a1.mozSampleRate, rate, "mozSampleRate should be " + rate + ".");