Bug 1549628 - enable wpt 'track-add-track.html'. r=jya
authoralwu <alwu@mozilla.com>
Tue, 07 May 2019 18:16:27 +0000
changeset 531760 8a577f046a209ccc0d955d171882a8deaa74d5c9
parent 531759 c98b1ae65a07e8af29fba7223c678f6355de58a0
child 531761 b377b5bdd883b97fedbfc61666edb780964c1f96
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1549628
milestone68.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 1549628 - enable wpt 'track-add-track.html'. r=jya Added missing event parameter for the callback function of `onaddtrack`. Differential Revision: https://phabricator.services.mozilla.com/D30143
testing/web-platform/meta/html/semantics/embedded-content/media-elements/track/track-element/track-add-track.html.ini
testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-add-track.html
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/track/track-element/track-add-track.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[track-add-track.html]
-  ['addtrack' event is fired when a TextTrack is created]
-    expected: FAIL
-
--- a/testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-add-track.html
+++ b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-add-track.html
@@ -8,17 +8,17 @@ async_test(function(t) {
 
     var trackElement = document.createElement('track');
     video.appendChild(trackElement);
     var tracks = [];
     tracks.push(trackElement.track);
 
     // Register the 'addtrack' listener after creating the element
     // to make sure the event is dispatched asynchronously.
-    video.textTracks.onaddtrack = t.step_func(function() {
+    video.textTracks.onaddtrack = t.step_func(function(event) {
         assert_equals(event.target, video.textTracks);
         assert_true(event instanceof TrackEvent, 'instanceof');
         assert_equals(event.track, tracks[video.textTracks.length - 1]);
 
         if (video.textTracks.length == 1) {
             tracks.push(video.addTextTrack('captions', 'Caption Track', 'en'));
             assert_equals(video.textTracks.length, 2);
         } else {
@@ -26,9 +26,9 @@ async_test(function(t) {
         }
     });
 
     trackElement.src = 'resources/webvtt-file.vtt';
     trackElement.track.mode = 'hidden';
     assert_equals(video.textTracks.length, 1);
     assert_equals(trackElement.readyState, HTMLTrackElement.NONE);
 });
-</script>
\ No newline at end of file
+</script>