Test media element fullscreen API when an element is in the DOM.




*** Creating <audio> element with "content/test.mp4" in the document, should NOT support fullscreen even though it has video
EVENT(loadstart)
EVENT(durationchange)
EVENT(canplaythrough)
* event handler NOT triggered by a user gesture
EXPECTED (mediaElement.webkitSupportsFullscreen == 'undefined') OK
EXPECTED (mediaElement.webkitDisplayingFullscreen == 'undefined') OK
* clicking on button
EVENT(mouseup)
* event handler triggered by user gesture

*** Creating <video> element with "content/test.mp4" in the document, should support fullscreen because it is a <video> element with video media
EVENT(loadstart)
EVENT(durationchange)
EVENT(canplaythrough)
* event handler NOT triggered by a user gesture
EXPECTED (mediaElement.webkitSupportsFullscreen == 'true') OK
EXPECTED (mediaElement.webkitDisplayingFullscreen == 'false') OK
TEST(mediaElement.webkitEnterFullScreen()) THROWS(DOMException.INVALID_STATE_ERR) OK
* clicking on button
EVENT(mouseup)
* event handler triggered by user gesture
RUN(mediaElement.webkitEnterFullScreen())
EVENT(webkitfullscreenchange)
EXPECTED (mediaElement.webkitDisplayingFullscreen == 'true') OK
RUN(mediaElement.webkitExitFullScreen())
EVENT(webkitfullscreenchange)

END OF TEST

