зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1712898 test that escaping selectAudioOutput prompt does not block future prompts r=jib,pbz
Differential Revision: https://phabricator.services.mozilla.com/D116795
This commit is contained in:
Родитель
2c764178d7
Коммит
8e4152d193
|
@ -40,6 +40,14 @@ async function deny() {
|
|||
await observerPromise;
|
||||
}
|
||||
|
||||
async function escape() {
|
||||
const observerPromise = expectObserverCalled("getUserMedia:response:deny");
|
||||
await promiseMessage(permissionError, () => {
|
||||
EventUtils.synthesizeKey("KEY_Escape");
|
||||
});
|
||||
await observerPromise;
|
||||
}
|
||||
|
||||
var gTests = [
|
||||
{
|
||||
desc: 'User clicks "Allow"',
|
||||
|
@ -58,6 +66,16 @@ var gTests = [
|
|||
await deny();
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: 'User presses "Esc"',
|
||||
run: async function checkBlock() {
|
||||
await requestAudioOutputExpectingPrompt();
|
||||
await escape();
|
||||
info("selectAudioOutput() after Esc should prompt again.");
|
||||
await requestAudioOutputExpectingPrompt();
|
||||
await allow();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
add_task(async function test() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче