Refactor MediaPlayer HTML5 tests

Pull out common tests so they can be shared across all MediaPlayer implementations.