Bug 1625099 - no need to wait for `metadatachange`. r=bryce

When controller gets deactivated, we would have had reset the display metadata already, so we can remove the promise for `metadatachange`.

The reason of causing failure is because `metadatachange` sometime would race with `deactivated`. If `metadatachange` gets dispatched after `deactivated`, we would miss that event.

The actual fix for event race will be handled in bug 1688507, this patch is simply fixing the failure.

Differential Revision: https://phabricator.services.mozilla.com/D102871
This commit is contained in:
alwu 2021-01-25 20:30:45 +00:00
Родитель 8c0dd1bca6
Коммит c9f0d77260
1 изменённых файлов: 0 добавлений и 1 удалений

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

@ -341,7 +341,6 @@ add_task(async function testMetadataAfterTabNavigation() {
await Promise.all([
new Promise(r => (tab.controller.ondeactivated = r)),
BrowserTestUtils.loadURI(tab.linkedBrowser, "about:blank"),
waitUntilDisplayedMetadataChanged(),
]);
info(`current media metadata should be reset`);