Tests MediaSource API state transitions.