1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
6 async function runTest() {
7 info(`Running tests with decoding from Utility`);
9 const platform = Services.appinfo.OS;
11 for (let { src, expectations } of audioTestData()) {
12 if (!(platform in expectations)) {
13 info(`Skipping ${src} for ${platform}`);
17 const expectation = expectations[platform];
19 info(`Add media tabs: ${src}`);
20 let tabs = [await addMediaTab(src), await addMediaTab(src)];
24 for (let tab of tabs) {
25 playback.push(play(tab, expectation.process, expectation.decoder));
28 info("Wait all playback");
29 await Promise.all(playback);
33 for (let tab of tabs) {
34 allstop.push(stop(tab));
37 info("Wait all stop");
38 await Promise.all(allstop);
42 for (let tab of tabs) {
43 remove.push(BrowserTestUtils.removeTab(tab));
46 info("Wait all tabs to be removed");
47 await Promise.all(remove);
51 add_task(async function testAudioDecodingInUtility() {
55 add_task(async function testAudioDecodingInRDD() {