Prevent 'removetrack' events from firing when all inband text tracks are removed.
This patch fixes a bug where 'removetrack' events were being fired
when all the inband tracks were being removed. This behavior was trying
to implement the "forget the media element's media-resource-specific
tracks" algorithm, but it wasn't correct.
This patch includes the following changes:
- Renames removeAllInbandTracks() to forgetResourceSpecificTracks()
- Reorganized logic in prepareForLoad() to match the spec order. The
shuffling should not have any user visible behaviour change.
- Added forgetResourceSpecificTracks() calls to other places that
the spec indicates it should run.
- Added code to make sure forgetResourceSpecificTracks() doesn't
trigger 'removetrack' events.
- Converted the existing media/track/track-remove-track.html test
to W3C test & added a new test case that verifies that the event
TEST=Existing LayoutTests still pass. Added a new case to media/track/track-remove-track.html