function synthTestQueue(aTestArgs, aEndFunc) { var utterances = []; for (var i in aTestArgs) { var uargs = aTestArgs[i][0]; var win = uargs.win || window; var u = new win.SpeechSynthesisUtterance(uargs.text);
if (uargs.args) { for (var attr in uargs.args) {
u[attr] = uargs.args[attr];
}
}
function onend_handler(e) {
is(e.target, utterances.shift(), "Target matches utterances");
ok(!speechSynthesis.speaking, "speechSynthesis is not speaking.");
if (utterances.length) {
ok(speechSynthesis.pending, "other utterances queued");
} else {
ok(!speechSynthesis.pending, "queue is empty, nothing pending."); if (aEndFunc) {
aEndFunc();
}
}
}
u.addEventListener( "start",
(function (expectedUri) { returnfunction (e) { if (expectedUri) { var chosenVoice = SpecialPowers.wrap(e).target.chosenVoiceURI;
is(chosenVoice, expectedUri, "Incorrect URI is used");
}
};
})(aTestArgs[i][1] ? aTestArgs[i][1].uri : null)
);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.