Bug 1509446 - part8 : modify wpt 'activeCues.html'. r=jya
authorAlastor Wu <alwu@mozilla.com>
Thu, 07 Mar 2019 19:25:56 +0000
changeset 520969 2f913db74eb5
parent 520968 b2ad34980053
child 520970 421bdcc103d3
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1509446
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509446 - part8 : modify wpt 'activeCues.html'. r=jya According to the spec [1], activeCues attribute must return a `live` TextTrackCueList object, so we should get the correct cue list immediately, no need to wait for next event loop. [1] https://html.spec.whatwg.org/multipage/media.html#dom-texttrack-activecues Differential Revision: https://phabricator.services.mozilla.com/D22152
testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/activeCues.html
--- a/testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/activeCues.html
+++ b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/activeCues.html
@@ -72,21 +72,18 @@ test1.step(function(){
             } catch(ex) {
                 test2.step(function() { throw ex; });
                 test3.step(function() { assert_unreached(); });
                 return;
             }
             test3.step(function(){
                 var c3 = new VTTCue(0, 2, "text3");
                 t1.addCue(c3);
-                assert_equals(t1.activeCues.length, 1, "t1.activeCues.length after adding a cue in the same script");
-                test3.step_timeout(function(){
-                    assert_equals(t1.activeCues.length, 2, "t1.activeCues.length after the event loop has spun");
-                    test3.done();
-                }, 0);
+                assert_equals(t1.activeCues.length, 2, "t1.activeCues.length should be changed immediately");
+                test3.done();
             });
             test2.done();
         });
         try {
             assert_equals(t1.activeCues, t1_cues, "t1.activeCues should return the same object after loading a video");
             assert_equals(t2.activeCues, t2_cues, "t2.activeCues should return the same object after loading a video");
             assert_equals(t1.activeCues.length, 0, "t1.activeCues.length before the video has started playing");
             assert_equals(t2.activeCues.length, 0, "t1.activeCues.length before the video has started playing");