blob: 1d344b3d99388a97f534be155929ef49620beafe [file] [log] [blame]
RUN(internals.setMediaElementRestrictions(audio, "RequireUserGestureForAudioRateChange,RequireUserGestureToControlControlsManager"))
RUN(audio.src = findMediaFile("audio", "content/test"))
EVENT(canplaythrough)
RUN(audio.play())
EVENT(playing)
EXPECTED (internals.bestMediaElementForShowingPlaybackControlsManager("NowPlaying") == '[object HTMLAudioElement]') OK
RUN(internals.applicationDidEnterBackground(true))
RUN(audio.currentTime = audio.duration - 0.1)
EVENT(ended)
RUN(audio.src = "")
RUN(audio.load())
EXPECTED (internals.bestMediaElementForShowingPlaybackControlsManager("NowPlaying") == '[object HTMLAudioElement]') OK
RUN(audio.src = findMediaFile("audio", "content/test"))
RUN(audio.load())
EVENT(canplaythrough)
RUN(audio.play())
EVENT(playing)
EXPECTED (internals.bestMediaElementForShowingPlaybackControlsManager("NowPlaying") == '[object HTMLAudioElement]') OK
END OF TEST