blob: e8c3a804ca03a6e5a7af32dc89f035291fb72c9d [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.bestMediaElementForRemoteControls("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.bestMediaElementForRemoteControls("NowPlaying") == '[object HTMLAudioElement]') OK
RUN(audio.src = findMediaFile("audio", "content/test"))
RUN(audio.load())
EVENT(canplaythrough)
RUN(audio.play())
EVENT(playing)
EXPECTED (internals.bestMediaElementForRemoteControls("NowPlaying") == '[object HTMLAudioElement]') OK
END OF TEST