From 580e319c3dde219d26ab8f1aa660d8545314398d Mon Sep 17 00:00:00 2001 From: alwu Date: Thu, 23 May 2019 09:03:14 +0000 Subject: [PATCH] Bug 1550633 - part13.5 - wait text track element's 'load' event. r=jya This patch do two things in order to trigger loading for track element and wait for correct event to check track's and cues' status after loading finished. (1) listen track element's load event There are some tests listening video's loadedmetadata, but it's wrong. The loading process of media element and track element are completely non-related. If you would like to check track element's status, you should wait for track element's load event. (2) enable track explictly If the text track which has default attribute is added to the media element before the media element starts running automatic track selection [1], then it would be enable by the media element. Otherwise, you have to enable track explicitly by changing its track mode. [1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-7 Differential Revision: https://phabricator.services.mozilla.com/D31913 --HG-- extra : moz-landing-system : lando --- dom/media/test/test_bug883173.html | 40 +- dom/media/test/test_bug895091.html | 40 +- dom/media/test/test_texttrack.html | 109 +++--- dom/media/test/test_texttrack_moz.html | 46 +-- dom/media/test/test_texttrackcue.html | 452 ++++++++++++----------- dom/media/test/test_texttrackregion.html | 54 +-- 6 files changed, 391 insertions(+), 350 deletions(-) diff --git a/dom/media/test/test_bug883173.html b/dom/media/test/test_bug883173.html index 15eadf80d4b4..6e36f3ca35bb 100644 --- a/dom/media/test/test_bug883173.html +++ b/dom/media/test/test_bug883173.html @@ -10,34 +10,26 @@ diff --git a/dom/media/test/test_bug895091.html b/dom/media/test/test_bug895091.html index 26f37fe28459..db43567503d0 100644 --- a/dom/media/test/test_bug895091.html +++ b/dom/media/test/test_bug895091.html @@ -3,6 +3,7 @@ Test for Bug 895091 - Integrating vtt.js + @@ -11,17 +12,13 @@ diff --git a/dom/media/test/test_texttrack.html b/dom/media/test/test_texttrack.html index f80c1a370c6b..3f72cee9ad08 100644 --- a/dom/media/test/test_texttrack.html +++ b/dom/media/test/test_texttrack.html @@ -3,13 +3,16 @@ Test for Bug 833386 - TextTrackList +