forked from mirrors/gecko-dev
Bug 1678813 - to ensure we would create promise focus before tab is closed. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D98014
This commit is contained in:
parent
50f32274b5
commit
3415872fa2
1 changed files with 7 additions and 9 deletions
|
|
@ -38,19 +38,17 @@ add_task(async function testNoSrcOrErrorMediaEntersPIPMode() {
|
|||
tab.linkedBrowser,
|
||||
testVideoId
|
||||
);
|
||||
await ensureMessageAndClosePiP(
|
||||
tab.linkedBrowser,
|
||||
testVideoId,
|
||||
winPIP,
|
||||
false
|
||||
);
|
||||
await Promise.all([
|
||||
// To ensure the focus would be gave back to the original window. If we do
|
||||
// not do that, then lacking of focus would interfere other following tests.
|
||||
SimpleTest.promiseFocus(window),
|
||||
ensureMessageAndClosePiP(tab.linkedBrowser, testVideoId, winPIP, false),
|
||||
]);
|
||||
|
||||
ok(!controller.isActive, "controller is still inactive");
|
||||
|
||||
info(`remove tab`);
|
||||
await tab.close();
|
||||
// To ensure the focus would be gave back to the original window. If we do
|
||||
// not do that, then lacking of focus would interfere other following tests.
|
||||
await SimpleTest.promiseFocus(window);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue