Layout tests needed for testing the functionality of JS bindings related to <track>: e.g. TextTrack, TextTrackCue, TextTrackCueList, MutableTextTrack, and the textTracks attribute on HTMLMediaElement.
Created attachment 107554 [details] Patch
Comment on attachment 107554 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=107554&action=review Does it make sense to commit this until the issues you mention in https://bugs.webkit.org/show_bug.cgi?id=62887 are resolved? > LayoutTests/ChangeLog:3 > + New layout tests for the JS bindings related to <track>: e.g. TextTrack, TextTrackCue, TextTrackCueList, MutableTextTrack, and the textTracks attribute on HTMLMediaElement. Not all editors wrap long lines, so it would be better to break this into multiple shorter lines > LayoutTests/media/track/track-mutable.html:1 > +<html> These are definitely HTML5 tests so they should have a DOCTYPE. > LayoutTests/media/track/track-mutable.html:27 > + testExpected("video.textTracks[0].cues.length", 0); > + captionsTrack.addCue("junk"); > + testExpected("video.textTracks[0].cues.length", 0); > + var cue1 = new TextTrackCue("1", 1.2, 3.4, "Cue #1") > + captionsTrack.addCue(cue1); > + testExpected("video.textTracks[0].cues.length", 1); I think it is helpful to be able to see both the condition being tested and the result of the test, so you might consider using "RUN(...)" so someone reading the output can understand what was tested without looking at the source. These are your tests though, so it is really your call.
(In reply to comment #2) > > Does it make sense to commit this until the issues you mention in https://bugs.webkit.org/show_bug.cgi?id=62887 are resolved? > Does it make sense to commit this *before* the issues...
Comment on attachment 107554 [details] Patch Thanks Eric! You're right about not committing the textTracks test until issues in https://bugs.webkit.org/show_bug.cgi?id=62887 are resolved. I've removed it for now. View in context: https://bugs.webkit.org/attachment.cgi?id=107554&action=review >> LayoutTests/ChangeLog:3 >> + New layout tests for the JS bindings related to <track>: e.g. TextTrack, TextTrackCue, TextTrackCueList, MutableTextTrack, and the textTracks attribute on HTMLMediaElement. > > Not all editors wrap long lines, so it would be better to break this into multiple shorter lines Done. >> LayoutTests/media/track/track-mutable.html:1 >> +<html> > > These are definitely HTML5 tests so they should have a DOCTYPE. Done. >> LayoutTests/media/track/track-mutable.html:27 >> + testExpected("video.textTracks[0].cues.length", 1); > > I think it is helpful to be able to see both the condition being tested and the result of the test, so you might consider using "RUN(...)" so someone reading the output can understand what was tested without looking at the source. These are your tests though, so it is really your call. Good idea. Done.
Created attachment 108085 [details] addressing eric's comments
Comment on attachment 108085 [details] addressing eric's comments Thanks!
Comment on attachment 108085 [details] addressing eric's comments Clearing flags on attachment: 108085 Committed r95639: <http://trac.webkit.org/changeset/95639>
All reviewed patches have been landed. Closing bug.