Bug 1678373 - Don't detach the media element from the tree for checking play time probes: it pauses the media element per spec. r=alwu

Differential Revision: https://phabricator.services.mozilla.com/D125080
This commit is contained in:
Paul Adenot 2021-10-07 15:44:52 +00:00
Родитель 16baeacc14
Коммит 575630f8df
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -87,7 +87,8 @@ add_task(async function testVisiblePlayTime() {
assertValueKeptUnchanged(videoChrome, "invisiblePlayTime");
info(`make video invisible`);
document.body.removeChild(video);
video.style.display = "none";
await once(video, "mozinvisibleplaytimestarted");
await assertValueConstantlyIncreases(videoChrome, "totalPlayTime");
await assertValueConstantlyIncreases(videoChrome, "invisiblePlayTime");
assertValueKeptUnchanged(videoChrome, "visiblePlayTime");