[Modern Media Controls] Turn modern media controls on by default
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2017 00:42:57 +0000 (00:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2017 00:42:57 +0000 (00:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165668

Patch by Antoine Quint <graouts@apple.com> on 2017-01-17
Reviewed by Dean Jackson.

Source/WebCore:

Tests: media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html
       media/modern-media-controls/pip-support/ipad/pip-support-enabled.html
       media/modern-media-controls/pip-support/ipad/pip-support-tap.html
       media/modern-media-controls/placard-support/ipad/placard-support-pip.html
       media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html

Fix an error which may be triggered prior to Sierra where we would assume the presentation
mode API was avaiable when it might not be, which caused a few tests to fail.

* Modules/modern-media-controls/media/pip-support.js:
(PiPSupport.prototype.syncControl):
(PiPSupport):

Source/WebKit/mac:

Enabled modern media controls by default in WK1.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Source/WebKit2:

Use DEFAULT_EXPERIMENTAL_FEATURES_ENABLED as the default value for modern media controls, which is true.

* Shared/WebPreferencesDefinitions.h:

Tools:

Enabled modern media controls by default in test runners.

* DumpRenderTree/TestOptions.h:
* WebKitTestRunner/TestOptions.h:

LayoutTests:

Turn modern media controls off for a majority of pre-existing tests that made assumptions on the implementation
of media controls.

For tests designed for modern media controls, we don't need to opt out since modern media controls are now on
by default, and we turn them back on since they were skipped. But we make these tests more resilient by:

    1. adding iPad-specific tests
    2. adding platform-agnostic ways to press an element, using either eventSender or uiController
    3. checking that elements that are sized asynchronously are indeed sized before making assumptions to that effect
    4. ensuring that we don't have additional scheduler.frameDidFire callbacks after we no longer need them

* TestExpectations:
* accessibility/mac/video-tag-hit-test.html:
* accessibility/mac/video-volume-slider-accessibility.html:
* accessibility/media-element.html:
* accessibility/media-emits-object-replacement.html:
* compositing/video/poster-expected.html:
* compositing/video/poster.html:
* fast/hidpi/video-controls-in-hidpi.html:
* fast/layers/video-layer.html:
* fullscreen/video-controls-drag.html:
* fullscreen/video-controls-override.html:
* fullscreen/video-controls-rtl.html:
* fullscreen/video-controls-timeline.html:
* http/tests/media/hls/video-controls-live-stream.html:
* http/tests/media/hls/video-duration-accessibility.html:
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html:
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html:
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html:
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html:
* media/accessibility-closed-captions-has-aria-owns.html:
* media/adopt-node-crash.html:
* media/airplay-autoplay.html:
* media/audio-as-video-fullscreen.html:
* media/audio-controls-do-not-fade-out.html:
* media/audio-controls-rendering.html:
* media/audio-controls-timeline-in-media-document.html:
* media/audio-delete-while-slider-thumb-clicked.html:
* media/audio-repaint.html:
* media/click-placeholder-not-pausing.html:
* media/click-volume-bar-not-pausing.html:
* media/controls-after-reload.html:
* media/controls-drag-timebar.html:
* media/controls-right-click-on-timebar.html:
* media/controls-strict.html:
* media/controls-styling.html:
* media/controls-without-preload.html:
* media/controls/airplay-controls.html:
* media/controls/airplay-picker.html:
* media/controls/basic.html:
* media/controls/elementOrder.html:
* media/controls/forced-tracks-only.html:
* media/controls/fullscreen-button-inline-layout.html:
* media/controls/inline-elements-dropoff-order.html:
* media/controls/picture-in-picture.html:
* media/controls/pip-placeholder-without-video-controls.html:
* media/controls/showControlsButton.html:
* media/controls/statusDisplay.html:
* media/controls/statusDisplayBad.html:
* media/controls/track-menu.html:
* media/mac/controls-panel-not-clipped-out-expected.html:
* media/mac/controls-panel-not-clipped-out.html:
* media/media-captions-no-controls.html:
* media/media-controller-drag-crash.html:
* media/media-controls-accessibility.html:
* media/media-controls-cancel-events.html:
* media/media-controls-clone.html:
* media/media-controls-drag-timeline-set-controls-property.html:
* media/media-controls-timeline-updates-after-playing.html:
* media/media-controls-timeline-updates-when-hovered.html:
* media/media-controls-timeline-updates.html:
* media/media-document-audio-controls-visible.html:
* media/media-document-audio-repaint.html:
* media/media-fullscreen-return-to-inline.html:
* media/modern-media-controls/airplay-button/airplay-button-on.html:
* media/modern-media-controls/airplay-button/airplay-button.html:
* media/modern-media-controls/airplay-placard/airplay-placard-text-section.html:
* media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
* media/modern-media-controls/audio/audio-controls-buttons.html:
* media/modern-media-controls/audio/audio-controls-metrics.html:
* media/modern-media-controls/button/button.html:
* media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
* media/modern-media-controls/forward-button/forward-button.html:
* media/modern-media-controls/fullscreen-button/fullscreen-button.html:
* media/modern-media-controls/fullscreen-support/fullscreen-support-click.html:
* media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap-expected.txt: Added.
* media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html: Added.
* media/modern-media-controls/icon-button/icon-button-active-state.html:
* media/modern-media-controls/icon-button/icon-button-on.html:
* media/modern-media-controls/icon-button/icon-button.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-controls-bar-styles.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-layout.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-time-control-styles.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html:
* media/modern-media-controls/layout-node/addChild.html:
* media/modern-media-controls/layout-node/children.html:
* media/modern-media-controls/layout-node/height.html:
* media/modern-media-controls/layout-node/insertAfter.html:
* media/modern-media-controls/layout-node/insertBefore.html:
* media/modern-media-controls/layout-node/node-made-dirty-during-layout.html:
* media/modern-media-controls/layout-node/remove.html:
* media/modern-media-controls/layout-node/removeChild.html:
* media/modern-media-controls/layout-node/subclassing.html:
* media/modern-media-controls/layout-node/visible.html:
* media/modern-media-controls/layout-node/width.html:
* media/modern-media-controls/layout-node/x.html:
* media/modern-media-controls/layout-node/y.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide.html:
* media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html:
* media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html:
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html:
* media/modern-media-controls/media-controller/media-controller-resize.html:
* media/modern-media-controls/media-controller/media-controller-scale-factor.html:
* media/modern-media-controls/media-controller/media-controller-single-container.html:
* media/modern-media-controls/mute-button/mute-button.html:
* media/modern-media-controls/pip-button/pip-button.html:
* media/modern-media-controls/pip-placard/pip-placard-text-section.html:
* media/modern-media-controls/pip-support/ipad/pip-support-enabled-expected.txt: Added.
* media/modern-media-controls/pip-support/ipad/pip-support-enabled.html: Copied from LayoutTests/media/modern-media-controls/pip-support/pip-support-enabled.html.
* media/modern-media-controls/pip-support/ipad/pip-support-tap-expected.txt: Added.
* media/modern-media-controls/pip-support/ipad/pip-support-tap.html: Copied from LayoutTests/media/modern-media-controls/pip-support/pip-support-click.html.
* media/modern-media-controls/pip-support/pip-support-click.html:
* media/modern-media-controls/pip-support/pip-support-enabled.html:
* media/modern-media-controls/placard-support/ipad/placard-support-pip-expected.txt: Copied from LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt.
* media/modern-media-controls/placard-support/ipad/placard-support-pip.html: Added.
* media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
* media/modern-media-controls/play-pause-button/play-pause-button.html:
* media/modern-media-controls/playback-support/playback-support-button-click-expected.txt:
* media/modern-media-controls/playback-support/playback-support-button-click.html:
* media/modern-media-controls/resources/media-controls-utils.js:
(pressOnElement):
(finishMediaControlsTest):
* media/modern-media-controls/rewind-button/rewind-button.html:
* media/modern-media-controls/scheduler/not-reentrant.html:
* media/modern-media-controls/scheduler/single-callback-when-registered-multiple-times.html:
* media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag-expected.txt: Copied from LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt.
* media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html: Added.
* media/modern-media-controls/scrubber-support/scrubber-support-click.html:
* media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt:
* media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
* media/modern-media-controls/seek-backward-support/seek-backward-support.html:
* media/modern-media-controls/seek-forward-support/seek-forward-support.html:
* media/modern-media-controls/skip-back-button/skip-back-button.html:
* media/modern-media-controls/slider/slider-fill.html:
* media/modern-media-controls/slider/slider-styles.html:
* media/modern-media-controls/start-support/start-support-click-to-start-expected.txt:
* media/modern-media-controls/start-support/start-support-click-to-start.html:
* media/modern-media-controls/status-label/status-label-font.html:
* media/modern-media-controls/status-label/status-label-text-selection.html:
* media/modern-media-controls/status-label/status-label.html:
* media/modern-media-controls/time-label/time-label.html:
* media/modern-media-controls/tracks-button/tracks-button.html:
* media/modern-media-controls/tracks-panel/tracks-panel-right-x.html:
* media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html:
* media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:
* media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel.html:
* media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls-expected.txt:
* media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html:
* media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html:
* media/modern-media-controls/volume-slider/volume-slider-value.html:
* media/modern-media-controls/volume-support/volume-support-click.html:
* media/modern-media-controls/volume-support/volume-support-drag.html:
* media/nodesFromRect-shadowContent.html:
* media/progress-events-generated-correctly.html:
* media/require-user-gesture-to-load-video.html:
* media/tab-focus-inside-media-elements.html:
* media/track/track-cue-rendering-horizontal.html:
* media/track/track-cue-rendering-vertical.html:
* media/track/track-cues-cuechange.html:
* media/track/track-cues-enter-exit.html:
* media/track/track-in-band-duplicate-tracks-when-source-changes.html:
* media/track/track-manual-mode.html:
* media/video-controls-audiotracks-trackmenu.html:
* media/video-controls-captions-trackmenu-localized.html:
* media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html:
* media/video-controls-captions-trackmenu-sorted.html:
* media/video-controls-captions-trackmenu.html:
* media/video-controls-drop-and-restore-timeline.html:
* media/video-controls-in-media-document.html:
* media/video-controls-no-display-with-text-track.html:
* media/video-controls-rendering.html:
* media/video-controls-show-on-kb-or-ax-event.html:
* media/video-controls-toggling.html:
* media/video-controls-transformed.html:
* media/video-controls-visible-audio-only.html:
* media/video-controls-visible-exiting-fullscreen.html:
* media/video-controls-zoomed.html:
* media/video-display-toggle.html:
* media/video-empty-source.html:
* media/video-fullscreeen-only-controls.html:
* media/video-fullscreeen-only-playback.html:
* media/video-initially-hidden-volume-slider-up.html:
* media/video-no-audio.html:
* media/video-play-audio-require-user-gesture.html:
* media/video-play-require-user-gesture.html:
* media/video-trackmenu-selection.html:
* media/video-volume-slider-drag.html:
* media/video-volume-slider.html:
* media/video-zoom-controls.html:
* media/volume-bar-empty-when-muted.html:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container.html:
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210834 268f45cc-cd09-0410-ab3c-d52691b4dbfc

223 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/accessibility/mac/video-tag-hit-test.html
LayoutTests/accessibility/mac/video-volume-slider-accessibility.html
LayoutTests/accessibility/media-element.html
LayoutTests/accessibility/media-emits-object-replacement.html
LayoutTests/compositing/video/poster-expected.html
LayoutTests/compositing/video/poster.html
LayoutTests/fast/hidpi/video-controls-in-hidpi.html
LayoutTests/fast/layers/video-layer.html
LayoutTests/fullscreen/video-controls-drag.html
LayoutTests/fullscreen/video-controls-override.html
LayoutTests/fullscreen/video-controls-rtl.html
LayoutTests/fullscreen/video-controls-timeline.html
LayoutTests/http/tests/media/hls/video-controls-live-stream.html
LayoutTests/http/tests/media/hls/video-duration-accessibility.html
LayoutTests/http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html
LayoutTests/http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html
LayoutTests/http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html
LayoutTests/http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html
LayoutTests/media/accessibility-closed-captions-has-aria-owns.html
LayoutTests/media/adopt-node-crash.html
LayoutTests/media/airplay-autoplay.html
LayoutTests/media/audio-as-video-fullscreen.html
LayoutTests/media/audio-controls-do-not-fade-out.html
LayoutTests/media/audio-controls-rendering.html
LayoutTests/media/audio-controls-timeline-in-media-document.html
LayoutTests/media/audio-delete-while-slider-thumb-clicked.html
LayoutTests/media/audio-repaint.html
LayoutTests/media/click-placeholder-not-pausing.html
LayoutTests/media/click-volume-bar-not-pausing.html
LayoutTests/media/controls-after-reload.html
LayoutTests/media/controls-drag-timebar.html
LayoutTests/media/controls-right-click-on-timebar.html
LayoutTests/media/controls-strict.html
LayoutTests/media/controls-styling.html
LayoutTests/media/controls-without-preload.html
LayoutTests/media/controls/airplay-controls.html
LayoutTests/media/controls/airplay-picker.html
LayoutTests/media/controls/basic.html
LayoutTests/media/controls/elementOrder.html
LayoutTests/media/controls/forced-tracks-only.html
LayoutTests/media/controls/fullscreen-button-inline-layout.html
LayoutTests/media/controls/inline-elements-dropoff-order.html
LayoutTests/media/controls/picture-in-picture.html
LayoutTests/media/controls/pip-placeholder-without-video-controls.html
LayoutTests/media/controls/showControlsButton.html
LayoutTests/media/controls/statusDisplay.html
LayoutTests/media/controls/statusDisplayBad.html
LayoutTests/media/controls/track-menu.html
LayoutTests/media/mac/controls-panel-not-clipped-out-expected.html
LayoutTests/media/mac/controls-panel-not-clipped-out.html
LayoutTests/media/media-captions-no-controls.html
LayoutTests/media/media-controller-drag-crash.html
LayoutTests/media/media-controls-accessibility.html
LayoutTests/media/media-controls-cancel-events.html
LayoutTests/media/media-controls-clone.html
LayoutTests/media/media-controls-drag-timeline-set-controls-property.html
LayoutTests/media/media-controls-timeline-updates-after-playing.html
LayoutTests/media/media-controls-timeline-updates-when-hovered.html
LayoutTests/media/media-controls-timeline-updates.html
LayoutTests/media/media-document-audio-controls-visible.html
LayoutTests/media/media-document-audio-repaint.html
LayoutTests/media/media-fullscreen-return-to-inline.html
LayoutTests/media/modern-media-controls/airplay-button/airplay-button-on.html
LayoutTests/media/modern-media-controls/airplay-button/airplay-button.html
LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html
LayoutTests/media/modern-media-controls/audio/audio-controls-buttons-expected.txt
LayoutTests/media/modern-media-controls/audio/audio-controls-buttons.html
LayoutTests/media/modern-media-controls/audio/audio-controls-metrics.html
LayoutTests/media/modern-media-controls/button/button.html
LayoutTests/media/modern-media-controls/buttons-container/buttons-container-buttons-property.html
LayoutTests/media/modern-media-controls/forward-button/forward-button.html
LayoutTests/media/modern-media-controls/fullscreen-button/fullscreen-button.html
LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-click.html
LayoutTests/media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state.html
LayoutTests/media/modern-media-controls/icon-button/icon-button-on.html
LayoutTests/media/modern-media-controls/icon-button/icon-button.html
LayoutTests/media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html
LayoutTests/media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-controls-bar-styles.html
LayoutTests/media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-layout.html
LayoutTests/media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-time-control-styles.html
LayoutTests/media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html
LayoutTests/media/modern-media-controls/layout-node/addChild.html
LayoutTests/media/modern-media-controls/layout-node/children.html
LayoutTests/media/modern-media-controls/layout-node/height.html
LayoutTests/media/modern-media-controls/layout-node/insertAfter.html
LayoutTests/media/modern-media-controls/layout-node/insertBefore.html
LayoutTests/media/modern-media-controls/layout-node/node-made-dirty-during-layout.html
LayoutTests/media/modern-media-controls/layout-node/remove.html
LayoutTests/media/modern-media-controls/layout-node/removeChild.html
LayoutTests/media/modern-media-controls/layout-node/subclassing.html
LayoutTests/media/modern-media-controls/layout-node/visible.html
LayoutTests/media/modern-media-controls/layout-node/width.html
LayoutTests/media/modern-media-controls/layout-node/x.html
LayoutTests/media/modern-media-controls/layout-node/y.html
LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html
LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html
LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles.html
LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html
LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html
LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html
LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-auto-hide.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-resize.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-scale-factor.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-single-container.html
LayoutTests/media/modern-media-controls/mute-button/mute-button.html
LayoutTests/media/modern-media-controls/pip-button/pip-button.html
LayoutTests/media/modern-media-controls/pip-placard/pip-placard-text-section.html
LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-enabled-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-enabled.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-tap-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-tap.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/pip-support/pip-support-click.html
LayoutTests/media/modern-media-controls/pip-support/pip-support-enabled.html
LayoutTests/media/modern-media-controls/placard-support/ipad/placard-support-pip-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/placard-support/ipad/placard-support-pip.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt
LayoutTests/media/modern-media-controls/play-pause-button/play-pause-button.html
LayoutTests/media/modern-media-controls/playback-support/playback-support-button-click-expected.txt
LayoutTests/media/modern-media-controls/playback-support/playback-support-button-click.html
LayoutTests/media/modern-media-controls/resources/media-controls-utils.js
LayoutTests/media/modern-media-controls/rewind-button/rewind-button.html
LayoutTests/media/modern-media-controls/scheduler/not-reentrant.html
LayoutTests/media/modern-media-controls/scheduler/single-callback-when-registered-multiple-times.html
LayoutTests/media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-click.html
LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt
LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-drag.html
LayoutTests/media/modern-media-controls/seek-backward-support/seek-backward-support.html
LayoutTests/media/modern-media-controls/seek-forward-support/seek-forward-support.html
LayoutTests/media/modern-media-controls/skip-back-button/skip-back-button.html
LayoutTests/media/modern-media-controls/slider/slider-fill.html
LayoutTests/media/modern-media-controls/slider/slider-styles.html
LayoutTests/media/modern-media-controls/start-support/start-support-click-to-start-expected.txt
LayoutTests/media/modern-media-controls/start-support/start-support-click-to-start.html
LayoutTests/media/modern-media-controls/status-label/status-label-font.html
LayoutTests/media/modern-media-controls/status-label/status-label-text-selection.html
LayoutTests/media/modern-media-controls/status-label/status-label.html
LayoutTests/media/modern-media-controls/time-label/time-label.html
LayoutTests/media/modern-media-controls/tracks-button/tracks-button.html
LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-right-x.html
LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html
LayoutTests/media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html
LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel.html
LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls-expected.txt
LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html
LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html
LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value.html
LayoutTests/media/modern-media-controls/volume-support/volume-support-click.html
LayoutTests/media/modern-media-controls/volume-support/volume-support-drag.html
LayoutTests/media/nodesFromRect-shadowContent.html
LayoutTests/media/progress-events-generated-correctly.html
LayoutTests/media/require-user-gesture-to-load-video.html
LayoutTests/media/tab-focus-inside-media-elements.html
LayoutTests/media/track/track-cue-rendering-horizontal.html
LayoutTests/media/track/track-cue-rendering-vertical.html
LayoutTests/media/track/track-cues-cuechange.html
LayoutTests/media/track/track-cues-enter-exit.html
LayoutTests/media/track/track-in-band-duplicate-tracks-when-source-changes.html
LayoutTests/media/track/track-manual-mode.html
LayoutTests/media/video-controls-audiotracks-trackmenu.html
LayoutTests/media/video-controls-captions-trackmenu-localized.html
LayoutTests/media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html
LayoutTests/media/video-controls-captions-trackmenu-sorted.html
LayoutTests/media/video-controls-captions-trackmenu.html
LayoutTests/media/video-controls-drop-and-restore-timeline.html
LayoutTests/media/video-controls-in-media-document.html
LayoutTests/media/video-controls-no-display-with-text-track.html
LayoutTests/media/video-controls-rendering.html
LayoutTests/media/video-controls-show-on-kb-or-ax-event.html
LayoutTests/media/video-controls-toggling.html
LayoutTests/media/video-controls-transformed.html
LayoutTests/media/video-controls-visible-audio-only.html
LayoutTests/media/video-controls-visible-exiting-fullscreen.html
LayoutTests/media/video-controls-zoomed.html
LayoutTests/media/video-display-toggle.html
LayoutTests/media/video-empty-source.html
LayoutTests/media/video-fullscreeen-only-controls.html
LayoutTests/media/video-fullscreeen-only-playback.html
LayoutTests/media/video-initially-hidden-volume-slider-up.html
LayoutTests/media/video-no-audio.html
LayoutTests/media/video-play-audio-require-user-gesture.html
LayoutTests/media/video-play-require-user-gesture.html
LayoutTests/media/video-trackmenu-selection.html
LayoutTests/media/video-volume-slider-drag.html
LayoutTests/media/video-volume-slider.html
LayoutTests/media/video-zoom-controls.html
LayoutTests/media/volume-bar-empty-when-muted.html
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/ios-simulator/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container.html
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/modern-media-controls/media/pip-support.js
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Tools/ChangeLog
Tools/DumpRenderTree/TestOptions.h
Tools/WebKitTestRunner/TestOptions.h

index 4766d9a..6cc4b96 100644 (file)
@@ -1,3 +1,237 @@
+2017-01-17  Antoine Quint  <graouts@apple.com>
+
+        [Modern Media Controls] Turn modern media controls on by default
+        https://bugs.webkit.org/show_bug.cgi?id=165668
+
+        Reviewed by Dean Jackson.
+
+        Turn modern media controls off for a majority of pre-existing tests that made assumptions on the implementation
+        of media controls.
+
+        For tests designed for modern media controls, we don't need to opt out since modern media controls are now on
+        by default, and we turn them back on since they were skipped. But we make these tests more resilient by:
+        
+            1. adding iPad-specific tests
+            2. adding platform-agnostic ways to press an element, using either eventSender or uiController
+            3. checking that elements that are sized asynchronously are indeed sized before making assumptions to that effect
+            4. ensuring that we don't have additional scheduler.frameDidFire callbacks after we no longer need them 
+
+        * TestExpectations:
+        * accessibility/mac/video-tag-hit-test.html:
+        * accessibility/mac/video-volume-slider-accessibility.html:
+        * accessibility/media-element.html:
+        * accessibility/media-emits-object-replacement.html:
+        * compositing/video/poster-expected.html:
+        * compositing/video/poster.html:
+        * fast/hidpi/video-controls-in-hidpi.html:
+        * fast/layers/video-layer.html:
+        * fullscreen/video-controls-drag.html:
+        * fullscreen/video-controls-override.html:
+        * fullscreen/video-controls-rtl.html:
+        * fullscreen/video-controls-timeline.html:
+        * http/tests/media/hls/video-controls-live-stream.html:
+        * http/tests/media/hls/video-duration-accessibility.html:
+        * http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html:
+        * http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html:
+        * http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html:
+        * http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html:
+        * media/accessibility-closed-captions-has-aria-owns.html:
+        * media/adopt-node-crash.html:
+        * media/airplay-autoplay.html:
+        * media/audio-as-video-fullscreen.html:
+        * media/audio-controls-do-not-fade-out.html:
+        * media/audio-controls-rendering.html:
+        * media/audio-controls-timeline-in-media-document.html:
+        * media/audio-delete-while-slider-thumb-clicked.html:
+        * media/audio-repaint.html:
+        * media/click-placeholder-not-pausing.html:
+        * media/click-volume-bar-not-pausing.html:
+        * media/controls-after-reload.html:
+        * media/controls-drag-timebar.html:
+        * media/controls-right-click-on-timebar.html:
+        * media/controls-strict.html:
+        * media/controls-styling.html:
+        * media/controls-without-preload.html:
+        * media/controls/airplay-controls.html:
+        * media/controls/airplay-picker.html:
+        * media/controls/basic.html:
+        * media/controls/elementOrder.html:
+        * media/controls/forced-tracks-only.html:
+        * media/controls/fullscreen-button-inline-layout.html:
+        * media/controls/inline-elements-dropoff-order.html:
+        * media/controls/picture-in-picture.html:
+        * media/controls/pip-placeholder-without-video-controls.html:
+        * media/controls/showControlsButton.html:
+        * media/controls/statusDisplay.html:
+        * media/controls/statusDisplayBad.html:
+        * media/controls/track-menu.html:
+        * media/mac/controls-panel-not-clipped-out-expected.html:
+        * media/mac/controls-panel-not-clipped-out.html:
+        * media/media-captions-no-controls.html:
+        * media/media-controller-drag-crash.html:
+        * media/media-controls-accessibility.html:
+        * media/media-controls-cancel-events.html:
+        * media/media-controls-clone.html:
+        * media/media-controls-drag-timeline-set-controls-property.html:
+        * media/media-controls-timeline-updates-after-playing.html:
+        * media/media-controls-timeline-updates-when-hovered.html:
+        * media/media-controls-timeline-updates.html:
+        * media/media-document-audio-controls-visible.html:
+        * media/media-document-audio-repaint.html:
+        * media/media-fullscreen-return-to-inline.html:
+        * media/modern-media-controls/airplay-button/airplay-button-on.html:
+        * media/modern-media-controls/airplay-button/airplay-button.html:
+        * media/modern-media-controls/airplay-placard/airplay-placard-text-section.html:
+        * media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
+        * media/modern-media-controls/audio/audio-controls-buttons.html:
+        * media/modern-media-controls/audio/audio-controls-metrics.html:
+        * media/modern-media-controls/button/button.html:
+        * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
+        * media/modern-media-controls/forward-button/forward-button.html:
+        * media/modern-media-controls/fullscreen-button/fullscreen-button.html:
+        * media/modern-media-controls/fullscreen-support/fullscreen-support-click.html:
+        * media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap-expected.txt: Added.
+        * media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html: Added.
+        * media/modern-media-controls/icon-button/icon-button-active-state.html:
+        * media/modern-media-controls/icon-button/icon-button-on.html:
+        * media/modern-media-controls/icon-button/icon-button.html:
+        * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html:
+        * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-controls-bar-styles.html:
+        * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-layout.html:
+        * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-time-control-styles.html:
+        * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html:
+        * media/modern-media-controls/layout-node/addChild.html:
+        * media/modern-media-controls/layout-node/children.html:
+        * media/modern-media-controls/layout-node/height.html:
+        * media/modern-media-controls/layout-node/insertAfter.html:
+        * media/modern-media-controls/layout-node/insertBefore.html:
+        * media/modern-media-controls/layout-node/node-made-dirty-during-layout.html:
+        * media/modern-media-controls/layout-node/remove.html:
+        * media/modern-media-controls/layout-node/removeChild.html:
+        * media/modern-media-controls/layout-node/subclassing.html:
+        * media/modern-media-controls/layout-node/visible.html:
+        * media/modern-media-controls/layout-node/width.html:
+        * media/modern-media-controls/layout-node/x.html:
+        * media/modern-media-controls/layout-node/y.html:
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles.html:
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html:
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
+        * media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html:
+        * media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html:
+        * media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html:
+        * media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html:
+        * media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html:
+        * media/modern-media-controls/media-controller/media-controller-auto-hide.html:
+        * media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html:
+        * media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html:
+        * media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
+        * media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html:
+        * media/modern-media-controls/media-controller/media-controller-resize.html:
+        * media/modern-media-controls/media-controller/media-controller-scale-factor.html:
+        * media/modern-media-controls/media-controller/media-controller-single-container.html:
+        * media/modern-media-controls/mute-button/mute-button.html:
+        * media/modern-media-controls/pip-button/pip-button.html:
+        * media/modern-media-controls/pip-placard/pip-placard-text-section.html:
+        * media/modern-media-controls/pip-support/ipad/pip-support-enabled-expected.txt: Added.
+        * media/modern-media-controls/pip-support/ipad/pip-support-enabled.html: Copied from LayoutTests/media/modern-media-controls/pip-support/pip-support-enabled.html.
+        * media/modern-media-controls/pip-support/ipad/pip-support-tap-expected.txt: Added.
+        * media/modern-media-controls/pip-support/ipad/pip-support-tap.html: Copied from LayoutTests/media/modern-media-controls/pip-support/pip-support-click.html.
+        * media/modern-media-controls/pip-support/pip-support-click.html:
+        * media/modern-media-controls/pip-support/pip-support-enabled.html:
+        * media/modern-media-controls/placard-support/ipad/placard-support-pip-expected.txt: Copied from LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt.
+        * media/modern-media-controls/placard-support/ipad/placard-support-pip.html: Added.
+        * media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
+        * media/modern-media-controls/play-pause-button/play-pause-button.html:
+        * media/modern-media-controls/playback-support/playback-support-button-click-expected.txt:
+        * media/modern-media-controls/playback-support/playback-support-button-click.html:
+        * media/modern-media-controls/resources/media-controls-utils.js:
+        (pressOnElement):
+        (finishMediaControlsTest):
+        * media/modern-media-controls/rewind-button/rewind-button.html:
+        * media/modern-media-controls/scheduler/not-reentrant.html:
+        * media/modern-media-controls/scheduler/single-callback-when-registered-multiple-times.html:
+        * media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag-expected.txt: Copied from LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt.
+        * media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html: Added.
+        * media/modern-media-controls/scrubber-support/scrubber-support-click.html:
+        * media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt:
+        * media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
+        * media/modern-media-controls/seek-backward-support/seek-backward-support.html:
+        * media/modern-media-controls/seek-forward-support/seek-forward-support.html:
+        * media/modern-media-controls/skip-back-button/skip-back-button.html:
+        * media/modern-media-controls/slider/slider-fill.html:
+        * media/modern-media-controls/slider/slider-styles.html:
+        * media/modern-media-controls/start-support/start-support-click-to-start-expected.txt:
+        * media/modern-media-controls/start-support/start-support-click-to-start.html:
+        * media/modern-media-controls/status-label/status-label-font.html:
+        * media/modern-media-controls/status-label/status-label-text-selection.html:
+        * media/modern-media-controls/status-label/status-label.html:
+        * media/modern-media-controls/time-label/time-label.html:
+        * media/modern-media-controls/tracks-button/tracks-button.html:
+        * media/modern-media-controls/tracks-panel/tracks-panel-right-x.html:
+        * media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html:
+        * media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:
+        * media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel.html:
+        * media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls-expected.txt:
+        * media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html:
+        * media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html:
+        * media/modern-media-controls/volume-slider/volume-slider-value.html:
+        * media/modern-media-controls/volume-support/volume-support-click.html:
+        * media/modern-media-controls/volume-support/volume-support-drag.html:
+        * media/nodesFromRect-shadowContent.html:
+        * media/progress-events-generated-correctly.html:
+        * media/require-user-gesture-to-load-video.html:
+        * media/tab-focus-inside-media-elements.html:
+        * media/track/track-cue-rendering-horizontal.html:
+        * media/track/track-cue-rendering-vertical.html:
+        * media/track/track-cues-cuechange.html:
+        * media/track/track-cues-enter-exit.html:
+        * media/track/track-in-band-duplicate-tracks-when-source-changes.html:
+        * media/track/track-manual-mode.html:
+        * media/video-controls-audiotracks-trackmenu.html:
+        * media/video-controls-captions-trackmenu-localized.html:
+        * media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html:
+        * media/video-controls-captions-trackmenu-sorted.html:
+        * media/video-controls-captions-trackmenu.html:
+        * media/video-controls-drop-and-restore-timeline.html:
+        * media/video-controls-in-media-document.html:
+        * media/video-controls-no-display-with-text-track.html:
+        * media/video-controls-rendering.html:
+        * media/video-controls-show-on-kb-or-ax-event.html:
+        * media/video-controls-toggling.html:
+        * media/video-controls-transformed.html:
+        * media/video-controls-visible-audio-only.html:
+        * media/video-controls-visible-exiting-fullscreen.html:
+        * media/video-controls-zoomed.html:
+        * media/video-display-toggle.html:
+        * media/video-empty-source.html:
+        * media/video-fullscreeen-only-controls.html:
+        * media/video-fullscreeen-only-playback.html:
+        * media/video-initially-hidden-volume-slider-up.html:
+        * media/video-no-audio.html:
+        * media/video-play-audio-require-user-gesture.html:
+        * media/video-play-require-user-gesture.html:
+        * media/video-trackmenu-selection.html:
+        * media/video-volume-slider-drag.html:
+        * media/video-volume-slider.html:
+        * media/video-zoom-controls.html:
+        * media/volume-bar-empty-when-muted.html:
+        * platform/gtk/TestExpectations:
+        * platform/ios-simulator/TestExpectations:
+        * platform/ios-simulator/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container.html:
+        * platform/mac-wk1/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2017-01-17  Chris Dumez  <cdumez@apple.com>
 
         Document title changed twice when setting document.title
index fc27b96..1204b5d 100644 (file)
@@ -682,9 +682,6 @@ webkit.org/b/146182 editing/selection/leak-document-with-selection-inside.html [
 # Media Sessions is not yet enabled by default: ENABLE(MEDIA_SESSION)
 media/session [ Skip ]
 
-# Skip modern-media-controls tests until flakiness can be resolved - webkit.org/b/164322
-media/modern-media-controls [ Skip ]
-
 # Only iOS WK1 has testRunner.setPagePaused.
 fast/dom/timer-fire-after-page-pause.html [ Skip ]
 
@@ -998,3 +995,6 @@ webkit.org/b/165195 fast/css/parsing-css-allowed-string-characters.html [ Pass F
 # Visual viewports
 webkit.org/b/165460 compositing/repaint/scroll-fixed-layer-no-content.html [ Failure ]
 webkit.org/b/165460 compositing/repaint/scroll-fixed-layer-out-of-view.html [ Failure ]
+
+# iOS-specific test
+media/modern-media-controls/media-controller/media-controller-scale-factor.html [ Skip ]
index 2a6159a..ca2db22 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
 <script src="../../resources/js-test-pre.js"></script>
index b00ecda..13c5689 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
 <script src="../../resources/js-test-pre.js"></script>
index fe76229..805ae66 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../resources/js-test-pre.js"></script>
index da4391e..fc5dcf0 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML>
+<!DOCTYPE HTML><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
 <script src="../resources/js-test-pre.js"></script>
index 458f5fa..e010466 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
 <style>
index 1c2a74e..fc88740 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
 <style>
index 896522a..ae804ba 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <script>
     function startTest() {
index 171f09b..44182b5 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
   <title>Video element gets layer</title>
index 45a726c..43b8723 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <body>
     <p>This tests that the video element's controls are draggable in full screen.  Press any key to continue.</p>
     <video id="video" width="300"></video>
index 8335df0..1982e59 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <body>
     <p>This tests that the video element's "controls" attribute is overridden in full screen mode, and that the controls are correctly hidden upon exiting full screen.  Press any key to continue.</p>
     <video id="video" width="300"></video>
index f309ea2..edb6da2 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <body>
     <p>This tests that the video element's controls in full screen mode flip the layout of the volume controls in RTL mode.</p>
     <video id="video" width="300"></video>
index 7dd21f9..f579777 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <body>
     <p>This tests that the video element's timeline controls are draggable in full screen.  Press any key to continue.</p>
     <video id="video" width="300" controls></video>
index 43beea2..80f085d 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src=../../media-resources/video-test.js></script>
index cdb5935..0f008dd 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src=../../media-resources/video-test.js></script>
index 1222d6f..264ee08 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
 <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'">
index a7f6ddf..9a699b5 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <script src="../resources/js-test-pre.js"></script>
index ae0dc3d..a5c9ed1 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML>
+<!DOCTYPE HTML><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 
 <html>
     <head>
index d3f4f78..cd234af 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>AirPlay target should persist across src change</title>
index 83b1a61..7f2757f 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Test that an audio file in a video element should not have a fullscreen button</title>
index 29dc400..f56c90d 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <body>
 <p>
     This tests that audio controls do not fade out when the audio is playing.
index 19636d3..33d49e9 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <style>
index 21148c0..28718a2 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <p>Pass if the timeline of audio in a media document is properly updated during playback.</p>
 <script src="media-file.js"></script>
 <script src="video-test.js"></script>
index da6e551..287db04 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <style>
index c203333..0b342cc 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <body>
 <p>
     This tests that in a html document with inline audio content, the media element repaints correctly
index 911d338..7181905 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Click on placeholder on a MediaDocument should not pause.</title>
index d907ef6..2d02b80 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <title>Click on volume bar on a MediaDocument does not pause.</title>
 
index 172306f..11aad41 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <script src=media-file.js></script>
index dd38ff6..1c9686d 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>drag timebar test</title>
index 24bd472..34dc225 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>right click on timebar test</title>
index de5b4de..c120fdd 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML>
+<!DOCTYPE HTML><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="media-file.js"></script>
index 453ae46..f1379bb 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <script src="media-file.js"></script>
index 6b20782..dc32dcf 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src=media-file.js></script>
index 4753249..fe501df 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index a33060c..c48fe30 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index b303d24..dd1e5f3 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index 876e527..3ffca6f 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index a628895..f3b50c6 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../video-test.js"></script>
index af41d32..d7a4263 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index 99bc564..774c48c 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index d9d0e0a..e930fb2 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index 673bf90..4be9b0c 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index 131c7c1..ff1e710 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index e05c538..8d364ce 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index 1930ead..be1d377 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../media-file.js"></script>
index 7c85e6c..b35640b 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src="../video-test.js"></script>
index 2f1d4eb..9b4bd8d 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <div style="position: relative; height: 100px; width: 200px">
     <audio controls style="height: 60px; width: 200px; position: absolute; bottom: 0;"></audio>
 </div>
index ef147cb..87c0e59 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <div style="position: relative; height: 100px; width: 200px">
     <audio controls style="height: 1px; width: 200px; position: absolute; bottom: 0;"></audio>
 </div>
index 0c209f4..135f0ef 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
index c7fbad1..cf6da9d 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
   <head>
     <title>Dragging through timebar test</title>
index d2cc8e7..702247c 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <video id="video" controls></video>
 <p id="description"></p>
index 7897fdc..63aac71 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src=media-file.js></script>
index affcfd8..a6af71f 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <!-- This should be converted to a reftest in the future. -->
 <body>
 <!-- 
index 5e6e626..2a0b9c1 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>media-controls-timeline-set-controls-property</title>
index cfe9d5f..fa75eea 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <p>This tests if media controls shows up and timeline is accordingly updated after playing the video.</p>
 <video controls></video>
 <script src=media-file.js></script>
index 0d0e5a4..2a680fd 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <p>This tests if media controls timeline is properly updated when a cursor hovers the controls during playback.</p>
 <video controls></video>
 <script src=media-file.js></script>
index a3b47c2..f60ba2b 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src=media-file.js></script>
index bbe600e..93882c1 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <script src='video-test.js'></script>
index aca81a3..9ac707e 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <script>
     if (window.testRunner)
         testRunner.waitUntilDone();
index 656980d..c5b6762 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>media-fullscreen-return-to-inline</title>
index 4e940d5..9ce3a56 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -18,7 +19,7 @@ scheduler.frameDidFire = function()
 {
     shouldBeTrue('airplayButton.element.classList.contains("on")');
     debug(`window.getComputedStyle(airplayButton.element).backgroundColor = ${window.getComputedStyle(airplayButton.element).backgroundColor}`);
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 4bba637..ba0d4cd 100644 (file)
@@ -1,4 +1,5 @@
 <script src="../../../resources/js-test-pre.js"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
index b89cf11..48df516 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -20,7 +21,7 @@ scheduler.frameDidFire = function()
 
     mediaControls.element.remove();
     debug("");
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 9c0ea1f..507cf5a 100644 (file)
@@ -3,7 +3,6 @@ Testing the <audio> controls buttons.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-Making AirPlay routes available.
 AirPlay routes became available.
 PASS mediaController.controls.controlsBar.children[2].children.length is 2
 PASS mediaController.controls.controlsBar.children[2].children[0] is mediaController.controls.muteButton
index 5aed6b3..619a325 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <audio src="../../content/test.mp4" style="width: 600px; height: 50px;" autoplay controls></audio>
 <div id="container"></div>
@@ -15,18 +16,15 @@ const mediaController = createControls(shadowRoot, media, null);
 
 window.internals.setMockMediaPlaybackTargetPickerEnabled(false);
 
-media.addEventListener("play", () => {
-    media.addEventListener("webkitplaybacktargetavailabilitychanged", playbackTargetAvailabilityChanged);
-
-    debug("Making AirPlay routes available.");
-    window.internals.setMockMediaPlaybackTargetPickerEnabled(true);
-});
+media.addEventListener("webkitplaybacktargetavailabilitychanged", playbackTargetAvailabilityChanged);
 
 function playbackTargetAvailabilityChanged(event)
 {
     if (event.availability != "available")
         return;
 
+    media.removeEventListener("webkitplaybacktargetavailabilitychanged", playbackTargetAvailabilityChanged);
+
     debug("AirPlay routes became available.");
 
     scheduler.frameDidFire = function()
@@ -38,7 +36,7 @@ function playbackTargetAvailabilityChanged(event)
         debug("");
         shadowRoot.remove();
         media.remove();
-        finishJSTest();
+        finishMediaControlsTest();
     };
 }
 
index a7fc2a3..f371afa 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <script type="text/javascript">
index ce6951e..cf3e49d 100644 (file)
@@ -1,18 +1,31 @@
 <link rel="stylesheet" href="../../../../Source/WebCore/Modules/modern-media-controls/controls/button.css" type="text/css" media="screen">
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
+<style type="text/css" media="screen">
+
+button {
+    width: 100px;
+    height: 100px;
+}
+    
+</style>
 <script type="text/javascript">
 
+window.jsTestIsAsync = true;
+
 description("Testing the <code>Button</code> class.");
 
-debug("Default values");
 const button = new Button;
+document.body.appendChild(button.element);
+
+debug("Default values");
 shouldBeTrue("button.enabled");
 shouldBeUndefined("button.uiDelegate");
 shouldBeEqualToString("button.element.localName", "button");
 
-let clickedButton;
+let clickedButton, style;
 
 debug("");
 debug("Responds to click events");
@@ -25,20 +38,22 @@ button.uiDelegate = {
     }
 
 }
-button.element.dispatchEvent(new MouseEvent("click"));
-
-debug("");
-debug("Doesn't respond to click events when disabled");
-button.enabled = false;
-button.element.dispatchEvent(new MouseEvent("click"));
 
-debug("");
-debug("Has all the appropriate styles")
-document.body.appendChild(button.element);
-const style = window.getComputedStyle(button.element);
-shouldBeEqualToString("style.position", "absolute");
-shouldBeEqualToString("style.borderWidth", "0px");
-shouldBeEqualToString("style.webkitAppearance", "none");
+pressOnElement(button.element, () => {
+    debug("");
+    debug("Doesn't respond to click events when disabled");
+    button.enabled = false;
+    pressOnElement(button.element, () => {
+        debug("");
+        debug("Has all the appropriate styles")
+        style = window.getComputedStyle(button.element);
+        shouldBeEqualToString("style.position", "absolute");
+        shouldBeEqualToString("style.borderWidth", "0px");
+        shouldBeEqualToString("style.webkitAppearance", "none");
+
+        finishJSTest();
+    });
+});
 
 </script>
 <script src="../../../resources/js-test-post.js"></script>
index d46f768..99efb6e 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -19,7 +20,7 @@ scheduler.frameDidFire = function()
     shouldBe("container.buttons.length", "3");
     shouldBe("container.children.length", "3");
     shouldBe("container.buttons", "container.children");
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 67f9acf..95a67fe 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -22,7 +23,7 @@ scheduler.frameDidFire = function()
         return;
 
     shouldBeTrue('forwardButton.element.style.webkitMaskImage.includes("macOS/forward@")');
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index c192cd5..68c36fb 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -27,7 +28,7 @@ scheduler.frameDidFire = function()
     shouldBeTrue('enterFullscreenButton.element.style.webkitMaskImage.includes("macOS/enter-fullscreen@")');
     shouldBeTrue('iOSEnterFullscreenButton.element.style.webkitMaskImage.includes("iOS/enter-fullscreen@")');
     shouldBeTrue('exitFullscreenButton.element.style.webkitMaskImage.includes("macOS/exit-fullscreen@")');
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 288ce1d..67f5a02 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <style type="text/css" media="screen">
     
@@ -31,21 +32,20 @@ scheduler.frameDidFire = function() {
     if (media.paused)
         return;
 
-    const input = mediaController.controls.fullscreenButton.element;
-    const bounds = input.getBoundingClientRect();
-    const centerX = bounds.left + bounds.width / 2;
-    const centerY = bounds.top + bounds.height / 2;
+    const button = mediaController.controls.fullscreenButton.element;
+    if (button.getBoundingClientRect().width === 0)
+        return;
 
-    eventSender.mouseMoveTo(centerX, centerY);
-    eventSender.mouseDown();
-    eventSender.mouseUp();
+    media.pause();
+    pressOnElement(button);
+    scheduler.frameDidFire = null;
 };
 
 media.addEventListener("webkitfullscreenchange", () => {
     shouldBeTrue("media.webkitDisplayingFullscreen");
     container.remove();
     media.remove();
-    finishJSTest();
+    finishMediaControlsTest();
 });
 
 </script>
diff --git a/LayoutTests/media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap-expected.txt b/LayoutTests/media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap-expected.txt
new file mode 100644 (file)
index 0000000..809e449
--- /dev/null
@@ -0,0 +1,10 @@
+Testing the FullscreenSupport behavior when tapping the fullscreen button.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS media.webkitDisplayingFullscreen is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html b/LayoutTests/media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html
new file mode 100644 (file)
index 0000000..0aaa54d
--- /dev/null
@@ -0,0 +1,56 @@
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../../resources/media-controls-utils.js" type="text/javascript"></script>
+<body>
+<style type="text/css" media="screen">
+    
+    video, #host {
+        position: absolute;
+        top: 0;
+        left: 0;
+    }
+
+    video {
+        width: 768px;
+        height: 240px;
+    }
+    
+</style>
+<video src="../../../content/test.mp4" autoplay controls></video>
+<div id="host"></div>
+<script type="text/javascript">
+
+window.jsTestIsAsync = true;
+
+description("Testing the <code>FullscreenSupport</code> behavior when tapping the fullscreen button.");
+
+const container = document.querySelector("div#host");
+const media = document.querySelector("video");
+const mediaController = createControls(container, media, null);
+
+media.addEventListener("webkitpresentationmodechanged", () => {
+    if (media.webkitDisplayingFullscreen) {
+        shouldBeTrue("media.webkitDisplayingFullscreen");
+        media.webkitExitFullscreen();
+    } else {
+        // We're giving the test time to finish the animation to exit fullscreen
+        // so that we are in a clean state for the next test.
+        setTimeout(() => {
+            container.remove();
+            media.remove();
+            finishJSTest();
+        }, 1000);
+    }
+});
+
+scheduler.frameDidFire = function() {
+    if (media.paused)
+        return;
+
+    if (pressOnElement(mediaController.controls.fullscreenButton.element))
+        scheduler.frameDidFire = null;
+};
+
+</script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
index de69d8d..89e0a9f 100644 (file)
@@ -11,30 +11,46 @@ const iconButton = new IconButton({ layoutDelegate: { layoutTraits: LayoutTraits
 iconButton.iconName = Icons.Pause;
 document.body.appendChild(iconButton.element);
 
+let x, y;
+
 function checkBackgroundColor()
 {
-    shouldBeEqualToString("window.getComputedStyle(iconButton.element).backgroundColor", "rgb(255, 255, 255)");
-    finishJSTest();
-}
-
-if ("testRunner" in window) {
-    const bounds = iconButton.element.getBoundingClientRect();
-    const x = bounds.left + 1;
-    const y = bounds.top + 1;
+    shouldBeEqualToString("window.getComputedStyle(iconButton.element).backgroundColor", "rgb(255, 255, 255)")
     if ("createTouch" in document) {
         testRunner.runUIScript(`
-        (function() {
-            uiController.touchDownAtPoint(${x}, ${y}, 1, function() {
+            uiController.liftUpAtPoint(${x}, ${y}, 1, function() {
                 uiController.uiScriptComplete("Done");
-            });
-        })();`, checkBackgroundColor);
+            })`, finishJSTest);
     } else {
-        eventSender.mouseMoveTo(x, y);
-        eventSender.mouseDown();
-        checkBackgroundColor();
+        eventSender.mouseUp();
+        finishJSTest();
     }
-} else
-    debug("This test is designed to run in DRT.");
+}
+
+scheduler.frameDidFire = function()
+{
+    const bounds = iconButton.element.getBoundingClientRect();
+    if (bounds.height === 0)
+        return;
+
+    scheduler.frameDidFire = null;
+
+    if ("testRunner" in window) {
+        x = bounds.left + 1;
+        y = bounds.top + 1;
+        if ("createTouch" in document) {
+            testRunner.runUIScript(`
+                uiController.touchDownAtPoint(${x}, ${y}, 1, function() {
+                    uiController.uiScriptComplete("Done");
+                })`, checkBackgroundColor);
+        } else {
+            eventSender.mouseMoveTo(x, y);
+            eventSender.mouseDown();
+            checkBackgroundColor();
+        }
+    } else
+        debug("This test is designed to run in DRT.");
+}
 
 </script>
 <script src="../../../resources/js-test-post.js"></script>
index 92c4218..244135e 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -18,7 +19,7 @@ scheduler.frameDidFire = function()
 
     iconButton.element.remove();
     debug("");
-    finishJSTest();
+    finishMediaControlsTest();
 }
 
 </script>
index 810d706..6f601a4 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -49,7 +50,7 @@ scheduler.frameDidFire = function()
         shouldBeEqualToString("iconButton.element.style.height", "70px");
         shouldBeEqualToString("iconButton.element.style.webkitMaskSize", "70px 70px");
 
-        finishJSTest();
+        finishMediaControlsTest();
     } 
 };
 
index a960e91..e252369 100644 (file)
@@ -23,6 +23,9 @@ scheduler.frameDidFire = function()
 {
     document.body.appendChild(mediaControls.element);
 
+    if (buttonPositions.some(buttonPosition => buttonPosition[0].width == 0))
+        return;
+
     for (let [button, y] of buttonPositions) {
         style = window.getComputedStyle(button.element);
         debug(button.constructor.name);
@@ -33,8 +36,7 @@ scheduler.frameDidFire = function()
     }
 
     mediaControls.element.remove();
-
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 1360797..e1867ec 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -33,7 +34,7 @@ scheduler.frameDidFire = function()
     shouldBe("mediaControls.controlsBar.children[0].children", "[mediaControls.playPauseButton, mediaControls.skipBackButton]");
     shouldBe("mediaControls.controlsBar.children[2].children", "[mediaControls.airplayButton, mediaControls.pipButton, mediaControls.fullscreenButton]");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index b4c3624..bbdc0cd 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -51,8 +52,7 @@ scheduler.frameDidFire = function()
         debug("");
     }
 
-    scheduler.frameDidFire = new Function;
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index c03d548..5a7c38b 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.addChild(child[, index])</code> method.");
@@ -34,7 +35,7 @@ scheduler.frameDidFire = function()
     shouldBeTrue("node.element.firstElementChild === b.element");
     shouldBeTrue("node.element.lastElementChild === a.element");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 1b5b929..38b8db4 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.children</code> property.");
@@ -58,7 +59,7 @@ scheduler.frameDidFire = function()
         break;
     case 3:
         shouldBeTrue("node.element.childElementCount === 0");
-        finishJSTest();
+        finishMediaControlsTest();
         break;
     }
 };
index 157f486..b5b3aab 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.height</code> property.");
@@ -37,7 +38,7 @@ scheduler.frameDidFire = function()
     shouldBeFalse("scheduler.hasScheduledLayoutCallbacks");
     debug("");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index e2a76aa..b9cac16 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.insertAfter(newSibling, referenceSibling)</code> method.");
@@ -52,7 +53,7 @@ scheduler.frameDidFire = function()
     shouldBeTrue("node.element.firstElementChild.nextElementSibling === c.element");
     shouldBeTrue("node.element.lastElementChild === a.element");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index f9d16aa..1bd766b 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.insertBefore(newSibling, referenceSibling)</code> method.");
@@ -52,7 +53,7 @@ scheduler.frameDidFire = function()
     shouldBeTrue("node.element.firstElementChild.nextElementSibling === c.element");
     shouldBeTrue("node.element.lastElementChild === a.element");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 3676a20..cb1a533 100644 (file)
@@ -1,6 +1,8 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
+
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.y</code> property.");
@@ -30,15 +32,9 @@ scheduler.frameDidFire = function()
         shouldBeEqualToString("node.element.style.left", "20px");
     else if (numberOfFrames == 2) {
         shouldBeEqualToString("node.element.style.left", "10px");
-        finishJSTest();
+        finishMediaControlsTest();
     }
 };
 
-// Half a second should be sufficient for this test to complete.
-setTimeout(() => {
-    debug("FAIL: Test timed out.");
-    finishJSTest();
-}, 500);
-
 </script>
 <script src="../../../resources/js-test-post.js"></script>
index 77ee513..5f599b0 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.remove()</code> method.");
@@ -42,7 +43,7 @@ scheduler.frameDidFire = function()
     shouldBeTrue("node.element.childElementCount === 1");
     shouldBeTrue("node.element.firstElementChild === c.element");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index d2c0f7e..002d6f7 100644 (file)
@@ -1,6 +1,8 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
+
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.removeChild(child)</code> method.");
@@ -48,7 +50,7 @@ scheduler.frameDidFire = function()
     shouldBeTrue("node.element.childElementCount === 1");
     shouldBeTrue("node.element.firstElementChild === c.element");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 5b275bb..0c1f2f7 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Subclassing <code>LayoutNode</code> by exposing a new custom property.");
@@ -64,7 +65,7 @@ scheduler.frameDidFire = function()
         node.needsLayout = true;
         break;
     case 2:
-        finishJSTest();
+        finishMediaControlsTest();
         break;
     }
 };
index 9a24a0f..ac63d53 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.visible</code> property.");
@@ -43,7 +44,7 @@ scheduler.frameDidFire = function()
         shouldBeFalse("scheduler.hasScheduledLayoutCallbacks");
         debug("");
 
-        finishJSTest();
+        finishMediaControlsTest();
         break;
     }
 };
index 113d49f..fce3e05 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.width</code> property.");
@@ -37,7 +38,7 @@ scheduler.frameDidFire = function()
     shouldBeFalse("scheduler.hasScheduledLayoutCallbacks");
     debug("");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 831bf78..d802087 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.x</code> property.");
@@ -37,7 +38,7 @@ scheduler.frameDidFire = function()
     shouldBeFalse("scheduler.hasScheduledLayoutCallbacks");
     debug("");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 2e733ec..9a1d9c6 100644 (file)
@@ -1,6 +1,7 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("Testing the <code>LayoutNode.y</code> property.");
@@ -37,7 +38,7 @@ scheduler.frameDidFire = function()
     shouldBeFalse("scheduler.hasScheduledLayoutCallbacks");
     debug("");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 914e91c..b177e1b 100644 (file)
@@ -1,5 +1,4 @@
 <script src="../../../resources/js-test-pre.js"></script>
-<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
 <body>
 <div id="container"></div>
@@ -31,25 +30,31 @@ scheduler.frameDidFire = function()
     if (buttons.some(button => button.width == 0))
         return;
 
-    document.getElementById("container").appendChild(mediaControls.element);
+    // All buttons have been loaded, we wait for the next tick to ensure
+    // that their CSS properties have also been committed.
+    window.requestAnimationFrame(() => {
+        document.getElementById("container").appendChild(mediaControls.element);
 
-    centerContainerBounds = centerContainer.element.getBoundingClientRect();
-    shouldBe("centerContainerBounds.left", "311");
-    shouldBe("centerContainerBounds.top", "500");
-    shouldBe("centerContainerBounds.width", "178");
-    shouldBe("centerContainerBounds.height", "44");
+        centerContainerBounds = centerContainer.element.getBoundingClientRect();
 
-    debug("");
-    rightContainerBounds = rightContainer.element.getBoundingClientRect();
-    shouldBeCloseTo("rightContainerBounds.left", 493, 0.5);
-    shouldBe("rightContainerBounds.top", "500");
-    shouldBeCloseTo("rightContainerBounds.width", 141, 0.5);
-    shouldBe("rightContainerBounds.height", "44");
+        shouldBe("centerContainerBounds.left", "311");
+        shouldBe("centerContainerBounds.top", "500");
+        shouldBe("centerContainerBounds.width", "178");
+        shouldBe("centerContainerBounds.height", "44");
 
-    mediaControls.element.remove();
+        debug("");
+        rightContainerBounds = rightContainer.element.getBoundingClientRect();
+        shouldBeCloseTo("rightContainerBounds.left", 493, 0.5);
+        shouldBe("rightContainerBounds.top", "500");
+        shouldBeCloseTo("rightContainerBounds.width", 141, 0.5);
+        shouldBe("rightContainerBounds.height", "44");
 
-    debug("");
-    finishJSTest();
+        debug("");
+        mediaControls.element.remove();
+        finishJSTest();
+    });
+
+    scheduler.frameDidFire = null;
 };
 
 </script>
index b02847e..21bae01 100644 (file)
@@ -25,6 +25,9 @@ scheduler.frameDidFire = function()
 {
     document.body.appendChild(mediaControls.element);
 
+    if (buttonPositions.some(buttonPosition => buttonPosition[0].width == 0))
+        return;
+
     for (let [button, x, y, width] of buttonPositions) {
         style = window.getComputedStyle(button.element);
         debug(button.constructor.name);
@@ -35,8 +38,7 @@ scheduler.frameDidFire = function()
     }
 
     mediaControls.element.remove();
-
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index a7678d7..a8b6192 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="width: 320px; height: 240px;" controls autoplay></video>
index 078c65e..468087e 100644 (file)
@@ -25,6 +25,9 @@ scheduler.frameDidFire = function()
 {
     document.body.appendChild(mediaControls.element);
 
+    if (buttonPositions.some(buttonPosition => buttonPosition[0].width == 0))
+        return;
+
     for (let [button, y] of buttonPositions) {
         style = window.getComputedStyle(button.element);
         debug(button.constructor.name);
@@ -35,8 +38,7 @@ scheduler.frameDidFire = function()
     }
 
     mediaControls.element.remove();
-
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index e77159b..91eb092 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -42,7 +43,7 @@ scheduler.frameDidFire = function()
 
     shouldBeTrue("mediaControls.volumeSlider.parent.x == expectedVolumeSliderContainerX");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index cf0cf4e..b400be8 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -26,7 +27,7 @@ scheduler.frameDidFire = function()
         shouldBeTrue("mediaControls.controlsBar.children.includes(mediaControls.statusLabel)");
         shouldBeFalse("mediaControls.controlsBar.children.includes(mediaControls.timeControl)");
         debug("");
-        finishJSTest();
+        finishMediaControlsTest();
     }
 };
 
index 5044c83..fbd2c3f 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -56,8 +57,7 @@ scheduler.frameDidFire = function()
         debug("");
     }
 
-    scheduler.frameDidFire = new Function;
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 85229f7..ceafe71 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="position: absolute; left: 0; top: 0; width: 320px; height: 240px;" controls autoplay data-auto-hide-delay="250"></video>
@@ -11,35 +11,37 @@ description("Testing the controls bar appears when the mouse enters and disappea
 let controlsBar;
 
 document.querySelector("video").addEventListener("play", (event) => {
-    const media = event.target;
-    controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
+    window.requestAnimationFrame(() => {
+        const media = event.target;
+        controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
 
-    debug("Video started playing, controls bar is visible by default.");
-    shouldBeFalse("controlsBar.classList.contains('faded')");
+        debug("Video started playing, controls bar is visible by default.");
+        shouldBeFalse("controlsBar.classList.contains('faded')");
 
-    setTimeout(() => {
-        debug("");
-        debug("Auto-hide timer has elapsed, controls bar should be faded.");
-        shouldBeTrue("controlsBar.classList.contains('faded')");
-
-        eventSender.mouseMoveTo(100, 100);
-        window.requestAnimationFrame(() => {
+        setTimeout(() => {
             debug("");
-            debug("Mouse moved over the media, controls bar should be visible.");
-            shouldBeFalse("controlsBar.classList.contains('faded')");
+            debug("Auto-hide timer has elapsed, controls bar should be faded.");
+            shouldBeTrue("controlsBar.classList.contains('faded')");
 
-            eventSender.mouseMoveTo(400, 400);
+            eventSender.mouseMoveTo(100, 100);
             window.requestAnimationFrame(() => {
                 debug("");
-                debug("Mouse moved out of the media, controls bar should be faded.");
-                shouldBeTrue("controlsBar.classList.contains('faded')");
-
-                debug("");
-                media.remove();
-                finishJSTest();
+                debug("Mouse moved over the media, controls bar should be visible.");
+                shouldBeFalse("controlsBar.classList.contains('faded')");
+
+                eventSender.mouseMoveTo(400, 400);
+                window.requestAnimationFrame(() => {
+                    debug("");
+                    debug("Mouse moved out of the media, controls bar should be faded.");
+                    shouldBeTrue("controlsBar.classList.contains('faded')");
+
+                    debug("");
+                    media.remove();
+                    finishJSTest();
+                });
             });
-        });
-    }, 300);
+        }, 300);
+    });
 });
 
 </script>
index 4284b0b..e2d31bc 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="position: absolute; left: 0; top: 0; width: 320px; height: 240px;" controls autoplay data-auto-hide-delay="250"></video>
@@ -11,35 +11,37 @@ description("Testing the controls bar reappears and remains visible when the mou
 let controlsBar;
 
 document.querySelector("video").addEventListener("play", (event) => {
-    const media = event.target;
-    controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
+    window.requestAnimationFrame(() => {
+        const media = event.target;
+        controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
 
-    debug("Video started playing, controls bar is visible by default.");
-    shouldBeFalse("controlsBar.classList.contains('faded')");
-
-    setTimeout(() => {
-        debug("");
-        debug("Auto-hide timer has elapsed, controls bar should be faded.");
-        shouldBeTrue("controlsBar.classList.contains('faded')");
-
-        eventSender.mouseMoveTo(100, 220);
-        window.requestAnimationFrame(() => {
-            debug("");
-            debug("Mouse moved over the media, controls bar should be visible.");
-            shouldBeFalse("controlsBar.classList.contains('faded')");
-        });
+        debug("Video started playing, controls bar is visible by default.");
+        shouldBeFalse("controlsBar.classList.contains('faded')");
 
         setTimeout(() => {
             debug("");
-            debug("Auto-hide timer would have elapsed, but the controls bar remains visible since the mouse is over the controls bar.");
-            shouldBeFalse("controlsBar.classList.contains('faded')");
+            debug("Auto-hide timer has elapsed, controls bar should be faded.");
+            shouldBeTrue("controlsBar.classList.contains('faded')");
+
+            eventSender.mouseMoveTo(100, 220);
+            window.requestAnimationFrame(() => {
+                debug("");
+                debug("Mouse moved over the media, controls bar should be visible.");
+                shouldBeFalse("controlsBar.classList.contains('faded')");
+            });
+
+            setTimeout(() => {
+                debug("");
+                debug("Auto-hide timer would have elapsed, but the controls bar remains visible since the mouse is over the controls bar.");
+                shouldBeFalse("controlsBar.classList.contains('faded')");
+
+                debug("");
+                media.remove();
+                finishJSTest();
+            }, 300);
 
-            debug("");
-            media.remove();
-            finishJSTest();
         }, 300);
-
-    }, 300);
+    });
 });
 
 </script>
index 3f4cb28..c0daecb 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="position: absolute; left: 0; top: 0; width: 320px; height: 240px;" controls autoplay data-auto-hide-delay="250"></video>
@@ -17,49 +17,51 @@ document.querySelector("video").addEventListener("play", (event) => {
 
     played = true;
 
-    const media = event.target;
-    controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
+    window.requestAnimationFrame(() => {
+        const media = event.target;
+        controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
 
-    debug("Video started playing, controls bar is visible by default.");
-    shouldBeFalse("controlsBar.classList.contains('faded')");
+        debug("Video started playing, controls bar is visible by default.");
+        shouldBeFalse("controlsBar.classList.contains('faded')");
 
-    debug("");
-    debug("Pausing media, this stops the auto-hide timer.");
-    media.pause();
-
-    setTimeout(() => {
         debug("");
-        debug("Resuming media playback, this should rewind the auto-hide timer and ensure that entering and leaving the media doesn't hide the controls bar until the auto-hide timer has expired after playing.");
-        media.play();
+        debug("Pausing media, this stops the auto-hide timer.");
+        media.pause();
 
         setTimeout(() => {
             debug("");
-            debug("Mouse entering the media.");
-            eventSender.mouseMoveTo(100, 100);
+            debug("Resuming media playback, this should rewind the auto-hide timer and ensure that entering and leaving the media doesn't hide the controls bar until the auto-hide timer has expired after playing.");
+            media.play();
 
             setTimeout(() => {
                 debug("");
-                debug("Mouse leaving the media.");
-                eventSender.mouseMoveTo(400, 400);
+                debug("Mouse entering the media.");
+                eventSender.mouseMoveTo(100, 100);
 
-                window.requestAnimationFrame(() => {
+                setTimeout(() => {
                     debug("");
-                    debug("The initial auto-hide timer started when we resumed playback should not have expired or be overriden by the mouse entering and leaving the media, the controls should remain visible.");
-                    shouldBeFalse("controlsBar.classList.contains('faded')");
+                    debug("Mouse leaving the media.");
+                    eventSender.mouseMoveTo(400, 400);
+
+                    window.requestAnimationFrame(() => {
+                        debug("");
+                        debug("The initial auto-hide timer started when we resumed playback should not have expired or be overriden by the mouse entering and leaving the media, the controls should remain visible.");
+                        shouldBeFalse("controlsBar.classList.contains('faded')");
 
-                });
+                    });
+                }, 50);
             }, 50);
-        }, 50);
 
-        setTimeout(() => {
-            debug("");
-            debug("The initial auto-hide timer started when we resumed playback should now have expired and the controls should be faded.");
-            shouldBeTrue("controlsBar.classList.contains('faded')");
+            setTimeout(() => {
+                debug("");
+                debug("The initial auto-hide timer started when we resumed playback should now have expired and the controls should be faded.");
+                shouldBeTrue("controlsBar.classList.contains('faded')");
 
-            debug("");
-            media.remove();
-            finishJSTest();
-        }, 300);
+                debug("");
+                media.remove();
+                finishJSTest();
+            }, 300);
+        });
     });
 });
 
index 577478f..b815094 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="position: absolute; left: 0; top: 0; width: 320px; height: 240px;" controls autoplay data-auto-hide-delay="250"></video>
@@ -11,23 +11,25 @@ description("Testing the controls bar remains visible when the media is paused."
 let controlsBar;
 
 document.querySelector("video").addEventListener("play", (event) => {
-    const media = event.target;
-    controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
+    window.requestAnimationFrame(() => {
+        const media = event.target;
+        controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
 
-    debug("Video started playing, controls bar is visible by default.");
-    shouldBeFalse("controlsBar.classList.contains('faded')");
+        debug("Video started playing, controls bar is visible by default.");
+        shouldBeFalse("controlsBar.classList.contains('faded')");
 
-    media.pause();
+        media.pause();
 
-    setTimeout(() => {
-        debug("");
-        debug("Auto-hide timer would have elapsed, but media was paused so controls bar should remain visible.");
-        shouldBeFalse("controlsBar.classList.contains('faded')");
+        setTimeout(() => {
+            debug("");
+            debug("Auto-hide timer would have elapsed, but media was paused so controls bar should remain visible.");
+            shouldBeFalse("controlsBar.classList.contains('faded')");
 
-        debug("");
-        media.remove();
-        finishJSTest();
-    }, 300);
+            debug("");
+            media.remove();
+            finishJSTest();
+        }, 300);
+    });
 });
 
 </script>
index 4a96187..67104f6 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="position: absolute; left: 0; top: 0; width: 320px; height: 240px;" controls autoplay data-auto-hide-delay="250"></video>
@@ -11,35 +11,36 @@ description("Testing the controls bar reappears when the mouse enters the media.
 let controlsBar;
 
 document.querySelector("video").addEventListener("play", (event) => {
-    const media = event.target;
-    controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
+    window.requestAnimationFrame(() => {
+        const media = event.target;
+        controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
 
-    debug("Video started playing, controls bar is visible by default.");
-    shouldBeFalse("controlsBar.classList.contains('faded')");
-
-    setTimeout(() => {
-        debug("");
-        debug("Auto-hide timer has elapsed, controls bar should be faded.");
-        shouldBeTrue("controlsBar.classList.contains('faded')");
-
-        eventSender.mouseMoveTo(100, 100);
-        window.requestAnimationFrame(() => {
-            debug("");
-            debug("Mouse moved over the media, controls bar should be visible.");
-            shouldBeFalse("controlsBar.classList.contains('faded')");
-        });
+        debug("Video started playing, controls bar is visible by default.");
+        shouldBeFalse("controlsBar.classList.contains('faded')");
 
         setTimeout(() => {
             debug("");
             debug("Auto-hide timer has elapsed, controls bar should be faded.");
             shouldBeTrue("controlsBar.classList.contains('faded')");
 
-            debug("");
-            media.remove();
-            finishJSTest();
+            eventSender.mouseMoveTo(100, 100);
+            window.requestAnimationFrame(() => {
+                debug("");
+                debug("Mouse moved over the media, controls bar should be visible.");
+                shouldBeFalse("controlsBar.classList.contains('faded')");
+            });
+
+            setTimeout(() => {
+                debug("");
+                debug("Auto-hide timer has elapsed, controls bar should be faded.");
+                shouldBeTrue("controlsBar.classList.contains('faded')");
+
+                debug("");
+                media.remove();
+                finishJSTest();
+            }, 300);
         }, 300);
-
-    }, 300);
+    });
 });
 
 </script>
index 85014b4..d46794d 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="position: absolute; left: 0; top: 0; width: 320px; height: 240px;" controls autoplay data-auto-hide-delay="250"></video>
@@ -12,10 +12,13 @@ let controlsBar;
 
 document.querySelector("video").addEventListener("play", (event) => {
     const media = event.target;
-    controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
 
-    debug("Video started playing, controls bar is visible by default.");
-    shouldBeFalse("controlsBar.classList.contains('faded')");
+    window.requestAnimationFrame(() => {
+        controlsBar = window.internals.shadowRoot(media).querySelector(".controls-bar");
+
+        debug("Video started playing, controls bar is visible by default.");
+        shouldBeFalse("controlsBar.classList.contains('faded')");
+    });
 
     setTimeout(() => {
         debug("");
index 2528683..8bdfa83 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="width: 640px; height: 480px;" controls autoplay></video>
index 6faea3e..7921d26 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="width: 320px; height: 240px;" controls></video>
index f108624..c1e76e2 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="position: absolute; top: 0; left: 0; width: 320px; height: 240px;" controls autoplay></video>
index ee8ba91..928af6d 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="position: absolute; top: 0; left: 0; width: 320px; height: 240px;" controls autoplay></video>
@@ -24,11 +24,13 @@ media.addEventListener("play", () => {
     window.requestAnimationFrame(() => clickOnElement(shadowRoot.querySelector("button.fullscreen")));
 });
 
-let becameInline = false;
-media.addEventListener("webkitpresentationmodechanged", function() {
-    if (becameInline)
+let previousPresentationMode = media.webkitPresentationMode;
+media.addEventListener("webkitpresentationmodechanged", () => {
+    if (previousPresentationMode === media.webkitPresentationMode)
         return;
 
+    previousPresentationMode = media.webkitPresentationMode;
+
     debug("");
     debug(`Media received a webkitpresentationmodechanged event, media.webkitPresentationMode = ${media.webkitPresentationMode}.`);
 
@@ -45,10 +47,9 @@ media.addEventListener("webkitpresentationmodechanged", function() {
     case "picture-in-picture":
         debug("");
         debug("We exit picture-in-picture.");
-        media.webkitSetPresentationMode("inline");
+        window.setTimeout(() => media.webkitSetPresentationMode("inline"));
         break;
     case "inline":
-        becameInline = true;
         window.requestAnimationFrame(() => {
             shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('inline')");
 
index 9674036..e9a4926 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="width: 320px; height: 240px;" controls></video>
index bb8003a..bffb570 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <meta name="viewport" content="width=400">
 <body>
index 349b9ef..d1fe1b1 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="width: 320px; height: 240px;" controls></video>
index c16e979..a42c567 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -27,7 +28,7 @@ scheduler.frameDidFire = function()
 
     shouldBeTrue('muteButton.element.style.webkitMaskImage.includes("macOS/volume@")');
     shouldBeTrue('mutedButton.element.style.webkitMaskImage.includes("macOS/volume-mute@")');
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index c1aebdf..cc8b664 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -23,7 +24,7 @@ scheduler.frameDidFire = function()
 
     shouldBeTrue('pipButton.element.style.webkitMaskImage.includes("macOS/pip-in@")');
     shouldBeTrue('iOSPiPButton.element.style.webkitMaskImage.includes("iOS/pip-in@")');
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 98edb31..ee16881 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -18,7 +19,7 @@ scheduler.frameDidFire = function()
 
     mediaControls.element.remove();
     debug("");
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
diff --git a/LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-enabled-expected.txt b/LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-enabled-expected.txt
new file mode 100644 (file)
index 0000000..5de642f
--- /dev/null
@@ -0,0 +1,12 @@
+Testing the PipSupport behavior.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mediaController.controls.pipButton.enabled is true
+PASS mediaController.controls.pipButton.enabled is false
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-enabled.html b/LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-enabled.html
new file mode 100644 (file)
index 0000000..7cee217
--- /dev/null
@@ -0,0 +1,45 @@
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../resources/media-controls-loader.js" type="text/javascript"></script>
+<body>
+<style type="text/css" media="screen">
+    
+    video, #host {
+        position: absolute;
+        top: 0;
+        left: 0;
+    }
+
+    video {
+        width: 800px;
+        height: 240px;
+    }
+    
+</style>
+<video src="../../../content/test.mp4" controls autoplay></video>
+<div id="host"></div>
+<script type="text/javascript">
+
+window.jsTestIsAsync = true;
+
+description("Testing the <code>PipSupport</code> behavior.");
+
+const container = document.querySelector("div#host");
+const media = document.querySelector("video");
+const mediaController = createControls(container, media, null);
+
+media.addEventListener("loadedmetadata", () => {
+    shouldBeTrue("mediaController.controls.pipButton.enabled");
+    media.src = "";
+});
+
+media.addEventListener("error", () => {
+    shouldBeFalse("mediaController.controls.pipButton.enabled");
+    debug("");
+    container.remove();
+    media.remove();
+    finishJSTest();
+});
+
+</script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
diff --git a/LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-tap-expected.txt b/LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-tap-expected.txt
new file mode 100644 (file)
index 0000000..769a677
--- /dev/null
@@ -0,0 +1,10 @@
+Testing the PiPSupport behavior when clicking the PiP button.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS media.webkitPresentationMode is "picture-in-picture"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-tap.html b/LayoutTests/media/modern-media-controls/pip-support/ipad/pip-support-tap.html
new file mode 100644 (file)
index 0000000..b6b77ee
--- /dev/null
@@ -0,0 +1,48 @@
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../../resources/media-controls-utils.js" type="text/javascript"></script>
+<body>
+<style type="text/css" media="screen">
+    
+    video, #host {
+        position: absolute;
+        top: 0;
+        left: 0;
+    }
+
+    video {
+        width: 768px;
+        height: 240px;
+    }
+    
+</style>
+<video src="../../../content/test.mp4" autoplay controls></video>
+<div id="host"></div>
+<script type="text/javascript">
+
+window.jsTestIsAsync = true;
+
+description("Testing the <code>PiPSupport</code> behavior when clicking the PiP button.");
+
+const container = document.querySelector("div#host");
+const media = document.querySelector("video");
+const mediaController = createControls(container, media, null);
+
+scheduler.frameDidFire = function() {
+    if (media.paused)
+        return;
+
+    if (pressOnElement(mediaController.controls.pipButton.element))
+        scheduler.frameDidFire = null;
+};
+
+media.addEventListener("webkitpresentationmodechanged", () => {
+    shouldBeEqualToString("media.webkitPresentationMode", "picture-in-picture");
+    container.remove();
+    media.remove();
+    finishMediaControlsTest();
+});
+
+</script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
index 76b9411..f69338e 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <style type="text/css" media="screen">
     
@@ -36,21 +37,20 @@ scheduler.frameDidFire = function() {
     if (media.paused)
         return;
 
-    const input = mediaController.controls.pipButton.element;
-    const bounds = input.getBoundingClientRect();
-    const centerX = bounds.left + bounds.width / 2;
-    const centerY = bounds.top + bounds.height / 2;
+    const button = mediaController.controls.pipButton.element;
+    if (button.getBoundingClientRect().width === 0)
+        return;
 
-    eventSender.mouseMoveTo(centerX, centerY);
-    eventSender.mouseDown();
-    eventSender.mouseUp();
+    media.pause();
+    pressOnElement(button);
+    scheduler.frameDidFire = null;
 };
 
 media.addEventListener("webkitpresentationmodechanged", () => {
     shouldBeEqualToString("media.webkitPresentationMode", "picture-in-picture");
     container.remove();
     media.remove();
-    finishJSTest();
+    finishMediaControlsTest();
 });
 
 </script>
index d5b64e5..2790f59 100644 (file)
@@ -15,7 +15,7 @@
     }
     
 </style>
-<video src="../../content/test.mp4"></video>
+<video src="../../content/test.mp4" controls autoplay></video>
 <div id="host"></div>
 <script type="text/javascript">
 
@@ -23,8 +23,6 @@ window.jsTestIsAsync = true;
 
 description("Testing the <code>PipSupport</code> behavior.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 if (window.internals)
     window.internals.settings.setAllowsPictureInPictureMediaPlayback(true);
 
diff --git a/LayoutTests/media/modern-media-controls/placard-support/ipad/placard-support-pip-expected.txt b/LayoutTests/media/modern-media-controls/placard-support/ipad/placard-support-pip-expected.txt
new file mode 100644 (file)
index 0000000..3c0a962
--- /dev/null
@@ -0,0 +1,13 @@
+Testing the PlacardSupport behavior when entering picture-in-picture.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mediaController.controls.showsPlacard is true
+PASS mediaController.controls.children.includes(mediaController.controls.pipPlacard) is true
+PASS mediaController.controls.showsPlacard is false
+PASS mediaController.controls.children.includes(mediaController.controls.pipPlacard) is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/media/modern-media-controls/placard-support/ipad/placard-support-pip.html b/LayoutTests/media/modern-media-controls/placard-support/ipad/placard-support-pip.html
new file mode 100644 (file)
index 0000000..7a716e8
--- /dev/null
@@ -0,0 +1,55 @@
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../../resources/media-controls-utils.js" type="text/javascript"></script>
+<body>
+<style type="text/css" media="screen">
+    
+    video, #host {
+        position: absolute;
+        top: 0;
+        left: 0;
+    }
+
+    video {
+        width: 800px;
+        height: 240px;
+    }
+    
+</style>
+<video src="../../../content/test.mp4" autoplay controls></video>
+<div id="host"></div>
+<script type="text/javascript">
+
+window.jsTestIsAsync = true;
+
+description("Testing the <code>PlacardSupport</code> behavior when entering picture-in-picture.");
+
+const container = document.querySelector("div#host");
+const media = document.querySelector("video");
+const mediaController = createControls(container, media, null);
+
+media.addEventListener("webkitpresentationmodechanged", () => {
+    if (media.webkitPresentationMode == "picture-in-picture") {
+        shouldBeTrue("mediaController.controls.showsPlacard");
+        shouldBeTrue("mediaController.controls.children.includes(mediaController.controls.pipPlacard)");
+        media.webkitSetPresentationMode("inline");
+    } else {
+        shouldBeFalse("mediaController.controls.showsPlacard");
+        shouldBeFalse("mediaController.controls.children.includes(mediaController.controls.pipPlacard)");
+        container.remove();
+        media.remove();
+        finishMediaControlsTest();
+    }
+});
+
+scheduler.frameDidFire = function() {
+    if (media.paused)
+        return;
+
+    if (pressOnElement(mediaController.controls.pipButton.element))
+        scheduler.frameDidFire = null;
+};
+
+</script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
index 297101e..9f6d86d 100644 (file)
@@ -3,6 +3,8 @@ Testing the PlacardSupport behavior when playing media through AirPlay.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+got event false
+got event true
 PASS mediaController.controls.showsPlacard is true
 PASS mediaController.controls.children.includes(mediaController.controls.airplayPlacard) is true
 PASS successfullyParsed is true
index c3794d0..9bda867 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -40,7 +41,7 @@ scheduler.frameDidFire = function()
     shouldBeTrue('iOSPauseButton.element.style.webkitMaskImage.includes("iOS/pause@")');
     shouldBeTrue('fullscreenPlayButton.element.style.webkitMaskImage.includes("macOS/play-fullscreen@")');
     shouldBeTrue('fullscreenPauseButton.element.style.webkitMaskImage.includes("macOS/pause-fullscreen@")');
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index dfcf6b1..e59ccc9 100644 (file)
@@ -3,16 +3,17 @@ Testing the PlaybackSupport behavior by clicking on the play/pause button.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS mediaController.controls.playPauseButton.playing is false
-
-Dispatching click event to the play/pause button
 Media is playing
 PASS mediaController.controls.playPauseButton.playing is true
 
-Dispatching click event to the play/pause button
+Pressing on the play/pause button
 Media is paused
 PASS mediaController.controls.playPauseButton.playing is false
 
+Pressing on the play/pause button
+Media is playing
+PASS mediaController.controls.playPauseButton.playing is true
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 35a24d6..455b1d1 100644 (file)
@@ -1,7 +1,8 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
-<video src="../../content/test.mp4" style="width: 320px; height: 240px;"></video>
+<video src="../../content/test.mp4" style="width: 320px; height: 240px;" controls autoplay></video>
 <div id="shadow"></div>
 <script type="text/javascript">
 
@@ -13,33 +14,37 @@ const shadowRoot = document.querySelector("div#shadow").attachShadow({ mode: "op
 const media = document.querySelector("video");
 const mediaController = createControls(shadowRoot, media, null);
 
-shouldBeFalse("mediaController.controls.playPauseButton.playing");
-
+let numberOfPlayEvents = 0;
 media.addEventListener("play", function() {
+    numberOfPlayEvents++;
+
     debug("Media is playing");
     shouldBeTrue("mediaController.controls.playPauseButton.playing");
 
-    clickPlayPauseButton();
+    if (numberOfPlayEvents === 1)
+        clickPlayPauseButton();
+    else {
+        debug("");
+        shadowRoot.host.remove();
+        media.remove();
+        finishJSTest();
+    }
 });
 
 media.addEventListener("pause", function() {
     debug("Media is paused");
     shouldBeFalse("mediaController.controls.playPauseButton.playing");
-    debug("");
-    shadowRoot.host.remove();
-    media.remove();
-    finishJSTest();
+
+    clickPlayPauseButton();
 });
 
 function clickPlayPauseButton()
 {
     debug("");
-    debug("Dispatching click event to the play/pause button");
-    mediaController.controls.playPauseButton.element.click();
+    debug("Pressing on the play/pause button");
+    window.requestAnimationFrame(() => pressOnElement(mediaController.controls.playPauseButton.element));
 }
 
-clickPlayPauseButton();
-
 </script>
 <script src="../../../resources/js-test-post.js"></script>
 </body>
index e664fb7..766a7c5 100644 (file)
@@ -46,4 +46,38 @@ function shouldBeEqualToRGBAColor(expr, expectedColor)
     shouldBeCloseTo(`rgba(${expr}).a`, expectedRGBA.a, 0.001);
 }
 
+function pressOnElement(element, continuation)
+{
+    if (typeof continuation !== "function")
+        continuation = new Function;
+
+    const bounds = element.getBoundingClientRect();
+    if (bounds.width === 0 || bounds.height === 0)
+        return false;
+
+    const centerX = bounds.left + bounds.width / 2;
+    const centerY = bounds.top + bounds.height / 2;
+
+    // debug(`Trying to press on &lt;${element.localName} class="${element.className}"> at ${centerX}x${centerY}.`);
+
+    if ("createTouch" in document) {
+        testRunner.runUIScript(`
+            uiController.singleTapAtPoint(${centerX}, ${centerY}, function() {
+                uiController.uiScriptComplete("Done");
+            });`, continuation);
+    } else {
+        eventSender.mouseMoveTo(centerX, centerY);
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+        continuation();
+    }
+
+    return true;
+}
 
+function finishMediaControlsTest()
+{
+    if (scheduler)
+        scheduler.frameDidFire = null;
+    finishJSTest();
+}
index 2fc4a4e..cd02ae3 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -22,7 +23,7 @@ scheduler.frameDidFire = function()
         return;
 
     shouldBeTrue('rewindButton.element.style.webkitMaskImage.includes("macOS/rewind@")');
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index eaa7c5b..bc4e63a 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("This test checks that calling `scheduleLayout()` during a layout callback delays that callback until the next frame.");
@@ -23,7 +24,7 @@ scheduler.frameDidFire = function()
     numberOfFrames++;
 
     if (numberOfFrames === 2)
-        finishJSTest();
+        finishMediaControlsTest();
 };
 
 function layout()
index 34ade02..3bb8bec 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <script type="text/javascript">
 
 description("This test checks that calling `scheduleLayout()` multiple times with the same function yields a single call to that function.");
@@ -18,7 +19,7 @@ function layout()
 scheduler.frameDidFire = function()
 {
     shouldBe("numberOfCalls", "1");
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 scheduler.scheduleLayout(layout);
diff --git a/LayoutTests/media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag-expected.txt b/LayoutTests/media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag-expected.txt
new file mode 100644 (file)
index 0000000..d16b59a
--- /dev/null
@@ -0,0 +1,10 @@
+Testing the ScrubberSupport behavior when dragging the scrubber.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+FAIL media.currentTime should be within 0.01 of 3.0136. Was 0.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html b/LayoutTests/media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html
new file mode 100644 (file)
index 0000000..5882842
--- /dev/null
@@ -0,0 +1,76 @@
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../resources/media-controls-loader.js" type="text/javascript"></script>
+<body>
+<style type="text/css" media="screen">
+    
+    video, #host {
+        position: absolute;
+        top: 0;
+        left: 0;
+    }
+
+    video {
+        width: 720px;
+        height: 240px;
+    }
+    
+</style>
+<video src="../../../content/test.mp4" autoplay controls></video>
+<div id="host"></div>
+<script type="text/javascript">
+
+window.jsTestIsAsync = true;
+
+description("Testing the <code>ScrubberSupport</code> behavior when dragging the scrubber.");
+
+const container = document.querySelector("div#host");
+const media = document.querySelector("video");
+const mediaController = createControls(container, media, null);
+
+let numberOfEvents = 0;
+scheduler.frameDidFire = function() {
+    if (media.paused)
+        return;
+
+    media.pause();
+
+    const input = mediaController.controls.timeControl.scrubber.children[1].element;
+    const bounds = input.getBoundingClientRect();
+
+    if (bounds.width === 0)
+        return;
+
+    media.addEventListener("timeupdate", () => {
+        numberOfEvents++;
+
+        debug("timeupdate event with media.currentTime = " + media.currentTime);
+    });
+
+    const minX = bounds.left + 7;
+    const dragStartX = minX;
+    const dragEndX = minX + bounds.width / 2;
+    const centerY = bounds.top + bounds.height / 2;
+
+    const point = document.body.appendChild(document.createElement("div"));
+    point.style.left = minX + "px";
+    point.style.top = centerY + "px";
+    point.style.width = "1px";
+    point.style.height = "1px";
+    point.style.position = "absolute";
+    point.style.backgroundColor = "red";
+
+    debug(`
+        uiController.dragFromPointToPoint(${dragStartX}, ${centerY}, ${dragEndX}, ${centerY}, 0.15, function() {
+            uiController.uiScriptComplete("Done");
+        });`);
+    testRunner.runUIScript(`
+        uiController.dragFromPointToPoint(${dragStartX}, ${centerY}, ${dragEndX}, ${centerY}, 0.15, function() {
+            uiController.uiScriptComplete("Done");
+        });`);
+
+    scheduler.frameDidFire = null;
+};
+
+</script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
index 8a15dfc..0b274a1 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <style type="text/css" media="screen">
     
@@ -33,6 +34,10 @@ scheduler.frameDidFire = function() {
     if (media.paused)
         return;
 
+    const scrubber = mediaController.controls.timeControl.scrubber.children[1].element;
+    if (scrubber.getBoundingClientRect().width === 0)
+        return;
+
     media.pause();
 
     media.addEventListener("timeupdate", () => {
@@ -41,15 +46,9 @@ scheduler.frameDidFire = function() {
         media.remove();
         finishJSTest();
     });
-
-    const input = mediaController.controls.timeControl.scrubber.children[1].element;
-    const bounds = input.getBoundingClientRect();
-    const centerX = bounds.left + bounds.width / 2;
-    const centerY = bounds.top + bounds.height / 2;
-
-    eventSender.mouseMoveTo(centerX, centerY);
-    eventSender.mouseDown();
-    eventSender.mouseUp();
+    
+    scheduler.frameDidFire = null;
+    pressOnElement(scrubber);
 };
 
 </script>
index 2fd2ebc..a38d24d 100644 (file)
@@ -3,7 +3,7 @@ Testing the ScrubberSupport behavior when dragging the scrubber.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS media.currentTime is within 0.01 of 3.0136
+PASS media.currentTime is within 0.2 of 3.0136
 PASS media.currentTime is 0
 PASS successfullyParsed is true
 
index 06da2c2..c54cefc 100644 (file)
@@ -32,15 +32,13 @@ scheduler.frameDidFire = function() {
     if (media.paused)
         return;
 
-    media.pause();
-
     const input = mediaController.controls.timeControl.scrubber.children[1].element;
     const bounds = input.getBoundingClientRect();
-
     if (bounds.width === 0)
         return;
 
-    const minX = bounds.left;
+    media.pause();
+
     const dragStartX = bounds.left + bounds.width / 2;
     const dragEndX = bounds.left;
     const centerY = bounds.top + bounds.height / 2;
@@ -49,7 +47,7 @@ scheduler.frameDidFire = function() {
         numberOfEvents++;
 
         if (numberOfEvents == 1) {
-            shouldBeCloseTo("media.currentTime", media.duration / 2, 0.01);
+            shouldBeCloseTo("media.currentTime", media.duration / 2, 0.2);
             const delta = dragEndX - dragStartX;
             const iterations = Math.abs(delta);
             for (let i = 1; i <= iterations; ++i)
@@ -62,12 +60,13 @@ scheduler.frameDidFire = function() {
             media.remove();
             finishJSTest();
         }
-        
+    
     });
 
     // Start dragging.
     eventSender.mouseMoveTo(dragStartX, centerY);
     eventSender.mouseDown();
+    scheduler.frameDidFire = null;
 };
 
 </script>
index 88fd066..ae7014c 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="width: 320px; height: 240px;" controls></video>
index c97189f..9ba486d 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/test.mp4" style="width: 320px; height: 240px;" controls></video>
index 8b6183c..b09261e 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -23,7 +24,7 @@ scheduler.frameDidFire = function()
 
     shouldBeTrue('skipBackButton.element.style.webkitMaskImage.includes("macOS/interval-skip-back@")');
     shouldBeTrue('iOSSkipBackButton.element.style.webkitMaskImage.includes("iOS/interval-skip-back@")');
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 60f3f74..d6ae944 100644 (file)
@@ -18,7 +18,7 @@ slider.value = 0.5;
 scheduler.frameDidFire = function()
 {
     shouldBeEqualToString("slider.children[0].element.style.width", "100px");
-    finishJSTest();
+    finishMediaControlsTest();
 }
 
 </script>
index ac6d54e..35603b0 100644 (file)
@@ -45,7 +45,7 @@ scheduler.frameDidFire = function()
     shouldBeEqualToString("inputStyle.borderRadius", "1.5px");
     shouldBeEqualToString("inputStyle.margin", "0px");
 
-    finishJSTest();
+    finishMediaControlsTest();
 }
 
 </script>
index 18e9dae..0c45eec 100644 (file)
@@ -5,7 +5,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS mediaController.controls.showsStartButton is true
 
-Dispatching click event to the start button
+Pressing on the start button
 Media is playing
 PASS mediaController.controls.showsStartButton is false
 
index 3408844..958539c 100644 (file)
@@ -1,7 +1,8 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
-<video src="../../content/test.mp4" style="width: 320px; height: 240px;"></video>
+<video src="../../content/test.mp4" style="width: 320px; height: 240px;" controls></video>
 <div id="shadow"></div>
 <script type="text/javascript">
 
@@ -16,8 +17,8 @@ const mediaController = createControls(shadowRoot, media, null);
 media.addEventListener("loadedmetadata", function() {
     shouldBeTrue("mediaController.controls.showsStartButton");
     debug("");
-    debug("Dispatching click event to the start button");
-    mediaController.controls.startButton.element.click();
+    debug("Pressing on the start button");
+    window.requestAnimationFrame(() => pressOnElement(mediaController.controls.startButton.element));
 });
 
 media.addEventListener("play", function() {
@@ -29,7 +30,6 @@ media.addEventListener("play", function() {
     finishJSTest();
 });
 
-
 </script>
 <script src="../../../resources/js-test-post.js"></script>
 </body>
index a904089..540ab50 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -17,7 +18,7 @@ scheduler.frameDidFire = function()
     shouldBeEqualToString("window.getComputedStyle(mediaControls.statusLabel.element).fontFamily", "-apple-system");
     mediaControls.element.remove();
     debug("");
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 22b0639..80b6be6 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -18,7 +19,7 @@ scheduler.frameDidFire = function()
     shouldBeEqualToString("window.getComputedStyle(mediaControls.statusLabel.element).cursor", "default");
     mediaControls.element.remove();
     debug("");
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index 97a3873..bbbd92e 100644 (file)
@@ -44,7 +44,7 @@ scheduler.frameDidFire = function()
 
     statusLabel.element.remove();
     debug("");
-    finishJSTest();
+    finishMediaControlsTest();
 }
 
 </script>
index bed1878..2369a9c 100644 (file)
@@ -43,7 +43,7 @@ scheduler.frameDidFire = function()
     shouldBeEqualToString("timeLabelWithNegativeValue.element.textContent", "-01:01");
     shouldBeEqualToString("timeLabelWithHours.element.textContent", "01:01:01");
 
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index e792696..13d89f3 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -23,7 +24,7 @@ scheduler.frameDidFire = function()
 
     shouldBeTrue('tracksButton.element.style.webkitMaskImage.includes("macOS/media-selection@")');
     shouldBeTrue('fullscreenTracksButton.element.style.webkitMaskImage.includes("macOS/media-selection-fullscreen@")');
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index de2a4a0..7ab71e2 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <script type="text/javascript">
 
@@ -17,7 +18,7 @@ scheduler.frameDidFire = function()
     shouldBeEqualToString("tracksPanel.element.style.right", "10px");
 
     debug("");
-    finishJSTest();
+    finishMediaControlsTest();
 };
 
 </script>
index fe2eaac..d14bc37 100644 (file)
@@ -77,7 +77,7 @@ scheduler.frameDidFire = function()
 
             debug("");
             debug("Activating the focused track by pressing the Enter key");
-            eventSender.keyDown("Enter");
+            window.requestAnimationFrame(() => eventSender.keyDown("Enter"));
         });
 
         eventSender.keyDown("ArrowDown");
index dda1ec4..b83c2ae 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/CC+Subtitles.mov" style="width: 640px; height: 360px;" controls autoplay></video>
index 5845b62..1f6b47c 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/CC+Subtitles.mov" style="width: 640px; height: 360px;" controls autoplay></video>
index 32b7b6d..a3c9742 100644 (file)
@@ -3,7 +3,7 @@ Testing the display of a tracks panel after dragging the controls bar in fullscr
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS shadowRoot.querySelector('.tracks-panel').style.right is "267px"
+PASS shadowRoot.querySelector('button.tracks').getBoundingClientRect().right === shadowRoot.querySelector('.tracks-panel').getBoundingClientRect().right is true
 PASS shadowRoot.querySelector('.tracks-panel').style.bottom is "151px"
 
 PASS successfullyParsed is true
index efa712c..f5b1994 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/CC+Subtitles.mov" style="width: 320px; height: 240px;" controls autoplay></video>
@@ -28,7 +28,7 @@ media.addEventListener("webkitfullscreenchange", () => {
                 window.requestAnimationFrame(() => {
                     clickOnButton("tracks");
                     window.requestAnimationFrame(() => {
-                        shouldBeEqualToString("shadowRoot.querySelector('.tracks-panel').style.right", "267px");
+                        shouldBeTrue("shadowRoot.querySelector('button.tracks').getBoundingClientRect().right === shadowRoot.querySelector('.tracks-panel').getBoundingClientRect().right");
                         shouldBeEqualToString("shadowRoot.querySelector('.tracks-panel').style.bottom", "151px");
 
                         debug("");
index 89ca4b8..11dace2 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<!DOCTYPE html>
 <script src="../../../resources/js-test-pre.js"></script>
 <body>
 <video src="../../content/CC+Subtitles.mov" style="width: 320px; height: 240px;" controls autoplay></video>
index 6564fc3..32aa316 100644 (file)
@@ -63,6 +63,8 @@ scheduler.frameDidFire = function()
     debug("");
     debug("Now we'll drag to the slider thumb from 10px to 30px within the slider's bounds");
     dragSlider(10, 30);
+    
+    scheduler.frameDidFire = null;
 }
 
 </script>
index f6503e9..d192fea 100644 (file)
@@ -29,15 +29,16 @@ const mediaController = createControls(container, media, null);
 
 let numberOfFrames = 0;
 scheduler.frameDidFire = function() {
-    if (media.paused)
+    const muteButtonElement = mediaController.controls.muteButton.element;
+    const muteButtonBounds = muteButtonElement.getBoundingClientRect();
+
+    if (media.paused || muteButtonBounds.width === 0)
         return;
 
     numberOfFrames++;
 
     if (numberOfFrames == 1) {
         // Controls are now visible, let's hover over the mute button to make the volume control visible.
-        const muteButtonElement = mediaController.controls.muteButton.element;
-        const muteButtonBounds = muteButtonElement.getBoundingClientRect();
         eventSender.mouseMoveTo(muteButtonBounds.left + muteButtonBounds.width / 2, muteButtonBounds.top + muteButtonBounds.height / 2);
     } else if (numberOfFrames == 2) {
         // Volume slider is visible, let's click in the middle of it.
@@ -45,6 +46,8 @@ scheduler.frameDidFire = function() {
         eventSender.mouseMoveTo(volumeSliderBounds.left + volumeSliderBounds.width / 2, volumeSliderBounds.top + volumeSliderBounds.height / 2);
         eventSender.mouseDown();
         eventSender.mouseUp();
+
+        scheduler.frameDidFire = null;
     }
 };
 
index f9835f7..ad4475a 100644 (file)
@@ -1,5 +1,6 @@
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
 <body>
 <style type="text/css" media="screen">
     
@@ -32,15 +33,15 @@ shouldBe("mediaController.controls.volumeSlider.value", "0");
 
 let numberOfFrames = 0;
 scheduler.frameDidFire = function() {
-    if (media.paused)
+    const muteButtonElement = mediaController.controls.muteButton.element;
+    const muteButtonBounds = muteButtonElement.getBoundingClientRect();
+    if (media.paused || muteButtonBounds.width === 0)
         return;
 
     numberOfFrames++;
 
     if (numberOfFrames == 1) {
         // Controls are now visible, let's hover over the mute button to make the volume control visible.
-        const muteButtonElement = mediaController.controls.muteButton.element;
-        const muteButtonBounds = muteButtonElement.getBoundingClientRect();
         eventSender.mouseMoveTo(muteButtonBounds.left + muteButtonBounds.width / 2, muteButtonBounds.top + muteButtonBounds.height / 2);
     } else if (numberOfFrames == 2) {
         // Volume slider is visible, let's start dragging in the middle of it.
@@ -73,7 +74,7 @@ scheduler.frameDidFire = function() {
         shouldBe("media.volume", "1");
         container.remove();
         media.remove();
-        finishJSTest();
+        finishMediaControlsTest();
     }
 };
 
index e34b1bf..2a4317e 100644 (file)
@@ -1,4 +1,4 @@
-<html>
+<html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <head>
   <title>Document::nodesFromRect shadow content access - bug 80847 </title>
   <style type="text/css" media="screen">
index 3f0fbc8..146dc9d 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <meta name="viewport" content="width=device-width">
     <title>Progress Events Generated Correctly During Loading</title>
index 2fe7702..dde6010 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
 <script src="media-controls.js"></script>
index ce8d061..912c25e 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html!>
+<!DOCTYPE html!><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <body>
 <audio controls></audio><video controls></video><br>
index 5d476bc..642eff1 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
index d42bea8..6889773 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <meta charset="utf-8">
index e2ab053..2b0bb43 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
index 0e2a143..df98766 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
index 0c36bba..0f2bece 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
index 09152fb..23dd2a4 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
index 328762e..e7d27ac 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>Selecting from a list of tracks</title>
index dad6942..91ce41a 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>Testing that the track menu gets localized strings</title>
index 6105371..ad6ab17 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>Testing that the list of tracks is sorted</title>
index 7c79410..ec93c14 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>Selecting from a list of tracks</title>
index 5913710..819d559 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Tests that the scrubber is dropped when a video is too narrow and restored when made wider</title>
index a795def..3bd88e2 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <p>Test that controls don't increase the size of the container (i.e. are
 rendered overlapping with the video canvas).<p>
 <script src="media-file.js" type="text/javascript"></script>
index db3640a..681932c 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Video controls no display with text track Test</title>
index 0ef5084..4674788 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <script src="media-file.js"></script>
 <script src="video-paint-test.js"></script>
 <body>
index eccc863..9a2c962 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <body onload="initialChecksBeforePlay()">
 <p>
     This tests:<br>
index de5b376..73c3966 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Test rendering of volume slider of video tag</title>
index 265db63..99db60e 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
   <title>Test controls on transformed video</title>
index b2a35ca..b8954b8 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <style>
index c4d254d..a5030ab 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Test rendering of video control after exiting fullscreen</title>
index c0dfbe4..616794a 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
   <title>Test controls with zooming</title>
index 83aae36..4933187 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src=media-file.js></script>
index 795501e..ffa0fbc 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script>
index a808f0c..43a9601 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <body>
     <p>This tests that when inline-playback is restricted, the video element's "controls" are always shown while inline.</p>
     <video id="video" width="300"></video>
index 0af0e52..258ea58 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src=media-file.js></script>
index 1f76d58..2bbfb0b 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <title>Test that volume slider is rendered up. </title>
 
index 2258625..4958396 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <script src=media-file.js></script>
index 062472f..539d3d1 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>Test that video play, pause and enterfullscreen does not work unless a user gesture is involved in playing a video</title>
index a3a2364..a68b1e5 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>Test that video play, pause and enterfullscreen does not work unless a user gesture is involved in playing a video</title>
index 71cb3fa..9e21ac9 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
     <head>
         <title>Selecting from a list of tracks</title>
index eea3553..5e75e9d 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Test that dragging the volume slider results in multiple volume change events.</title>
index 835ca9e..c86590e 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Test rendering of volume slider of video tag</title>
index dea9011..8a6aea8 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <style>
index 563d5f8..fdc7405 100644 (file)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
 <html>
 <head>
     <title>Test rendering of volume slider of video tag</title>
index 15cefe1..71bcfb4 100644 (file)
@@ -2680,10 +2680,6 @@ webkit.org/b/163383 accessibility/meter-element.html [ Failure ]
 webkit.org/b/163383 accessibility/roles-computedRoleString.html [ Failure ]
 webkit.org/b/163383 accessibility/roles-exposed.html [ Failure ]
 
-webkit.org/b/163518 media/modern-media-controls/airplay-button/airplay-button-on.html [ Failure ]
-webkit.org/b/163519 media/modern-media-controls/icon-button/icon-button-active-state.html [ Failure ]
-webkit.org/b/163520 media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html [ Failure ]
-
 webkit.org/b/163512 media/media-controls-accessibility.html [ Failure ]
 webkit.org/b/163521 media/tab-focus-inside-media-elements.html [ Failure ]
 webkit.org/b/163523 media/track/track-manual-mode.html [ Failure ]
@@ -2702,8 +2698,6 @@ webkit.org/b/163823 media/context-menu-actions.html [ Failure ]
 webkit.org/b/163823 media/video-defaultmuted.html [ Failure ]
 webkit.org/b/163823 media/video-volume-slider.html [ Failure ]
 
-webkit.org/b/163825 media/modern-media-controls/media-controller/media-controller-resize.html [ Failure ]
-
 webkit.org/b/163826 storage/domstorage/events/basic-body-attribute.html [ Failure ]
 
 webkit.org/b/163827 storage/websql/quota-tracking.html [ Failure ]
index d7aafa9..ac5b207 100644 (file)
@@ -2769,6 +2769,60 @@ webkit.org/b/165691 http/tests/security/contentSecurityPolicy/block-all-mixed-co
 
 fast/css/deferred-parsing/hover-test.html [ Skip ]
 
+# iOS-specific test
+media/modern-media-controls/media-controller/media-controller-scale-factor.html [ Pass ]
+
+# The tracks menu is never used in media controls on iOS
+media/modern-media-controls/tracks-panel [ Skip ]
+media/modern-media-controls/tracks-support [ Skip ]
+
+# There is no mute button or volume scrubber on iOS
+media/modern-media-controls/mute-button [ Skip ]
+media/modern-media-controls/mute-support [ Skip ]
+media/modern-media-controls/volume-slider [ Skip ]
+media/modern-media-controls/volume-support [ Skip ]
+
+# Fullscreen is handled natively on iOS, so no need to test fullscreen or controls only shown in fullscreen
+media/modern-media-controls/macos-fullscreen-media-controls [ Skip ]
+media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html [ Skip ]
+media/modern-media-controls/media-controller/media-controller-fullscreen-change.html [ Skip ]
+media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html [ Skip ]
+media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html [ Skip ]
+media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html [ Skip ]
+media/modern-media-controls/seek-backward-support [ Skip ]
+media/modern-media-controls/seek-forward-support [ Skip ]
+media/modern-media-controls/start-support/start-support-fullscreen.html [ Skip ]
+
+# These tests are mouse-specific
+media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html [ Skip ]
+media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html [ Skip ]
+media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html [ Skip ]
+media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html [ Skip ]
+media/modern-media-controls/scrubber-support/scrubber-support-click.html [ Skip ]
+
+# Tests designed for macOS that have iOS equivalents in "ipad" directories
+media/modern-media-controls/fullscreen-support/fullscreen-support-click.html [ Skip ]
+media/modern-media-controls/pip-support/pip-support-click.html [ Skip ]
+media/modern-media-controls/pip-support/pip-support-enabled.html [ Skip ]
+media/modern-media-controls/placard-support/placard-support-pip.html [ Skip ]
+media/modern-media-controls/scrubber-support/scrubber-support-drag.html [ Skip ]
+media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html [ Skip ]
+
+# These tests use uiController and need to be skipped in open-source
+media/modern-media-controls/placard-support/ipad/placard-support-pip.html [ Skip ]
+media/modern-media-controls/icon-button/icon-button-active-state.html [ Skip ]
+media/modern-media-controls/pip-support/ipad/pip-support-tap.html [ Skip ]
+media/modern-media-controls/playback-support/playback-support-button-click.html [ Skip ]
+media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html [ Skip ]
+media/modern-media-controls/start-support/start-support-click-to-start.html [ Skip ]
+media/modern-media-controls/button/button.html [ Skip ]
+
+# AirPlay cannot be tested on iOS
+webkit.org/b/166062 media/modern-media-controls/airplay-placard/airplay-placard-text-section.html [ Skip ]
+webkit.org/b/166062 media/modern-media-controls/airplay-support/airplay-support.html [ Skip ]
+webkit.org/b/166062 media/modern-media-controls/placard-support/placard-support-airplay.html [ Skip ]
+webkit.org/b/166062 media/modern-media-controls/audio/audio-controls-buttons.html [ Skip ]
+
 # New Encrypted Media API not enabled on iOS
 media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html [ Skip ]
 
index 136fabd..875cbe5 100644 (file)
@@ -291,3 +291,10 @@ webkit.org/b/165541 compositing/layer-creation/fixed-overlap-extent-rtl.html [ F
 webkit.org/b/165541 compositing/rtl/rtl-fixed-overflow.html [ Failure ]
 
 webkit.org/b/165589 pointer-lock/lock-lost-on-esc-in-fullscreen.html [ Skip ]
+
+# webkit.org/b/163585
+media/track/track-cues-cuechange.html [ Pass Crash ]
+media/track/track-cue-rendering-horizontal.html [ Pass Crash ]
+media/accessibility-closed-captions-has-aria-owns.html [ Pass Crash ]
+media/track/track-cues-enter-exit.html [ Pass Crash ]
+media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html [ Pass Timeout ]
index bd6d48b..def28c3 100644 (file)
@@ -1461,6 +1461,32 @@ webkit.org/b/165222 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/idbindex
 webkit.org/b/165530 compositing/layer-creation/fixed-position-out-of-view-scaled.html [ Failure ]
 webkit.org/b/165530 compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html [ Failure ]
 
+# picture-in-picture is not supported prior to Sierra.
+[ ElCapitan Yosemite ] media/modern-media-controls/pip-support [ Skip ]
+[ ElCapitan Yosemite ] media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html [ Skip ]
+[ ElCapitan Yosemite ] media/modern-media-controls/placard-support/placard-support-pip.html [ Skip ]
+
+# internals.setMockMediaPlaybackTargetPickerState() is not available on Yosemite
+[ Yosemite ] media/modern-media-controls/airplay-support/airplay-support.html [ Skip ]
+[ Yosemite ] media/modern-media-controls/placard-support/placard-support-airplay.html [ Skip ]
+
+# internals.setMockMediaPlaybackTargetPickerEnabled() is not available on Yosemite
+[ Yosemite ] media/modern-media-controls/audio/audio-controls-buttons.html [ Skip ]
+
+# iPad-specific tests
+media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html [ Skip ]
+media/modern-media-controls/pip-support/ipad/pip-support-enabled.html [ Skip ]
+media/modern-media-controls/pip-support/ipad/pip-support-tap.html [ Skip ]
+media/modern-media-controls/placard-support/ipad/placard-support-pip.html [ Skip ]
+media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html [ Skip ]
+
+# These sometimes work but more often than not don't
+webkit.org/b/164323 media/modern-media-controls/airplay-support/airplay-support.html [ Pass Failure ]
+webkit.org/b/164298 media/modern-media-controls/placard-support/placard-support-airplay.html [ Pass Failure ]
+
+# This one always times out on the bots, cannot reproduce locally.
+webkit.org/b/165234 media/modern-media-controls/audio/audio-controls-buttons.html [ Pass Timeout ]
+
 webkit.org/b/165874 [ Debug ] streams/pipe-to.html [ Pass Failure ]
 
 # New Encrypted Media API not enabled on Mac
index 5f9e858..4d1d181 100644 (file)
@@ -1,3 +1,23 @@
+2017-01-17  Antoine Quint  <graouts@apple.com>
+
+        [Modern Media Controls] Turn modern media controls on by default
+        https://bugs.webkit.org/show_bug.cgi?id=165668
+
+        Reviewed by Dean Jackson.
+
+        Tests: media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html
+               media/modern-media-controls/pip-support/ipad/pip-support-enabled.html
+               media/modern-media-controls/pip-support/ipad/pip-support-tap.html
+               media/modern-media-controls/placard-support/ipad/placard-support-pip.html
+               media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html
+
+        Fix an error which may be triggered prior to Sierra where we would assume the presentation
+        mode API was avaiable when it might not be, which caused a few tests to fail.
+
+        * Modules/modern-media-controls/media/pip-support.js:
+        (PiPSupport.prototype.syncControl):
+        (PiPSupport):
+
 2017-01-17  Chris Dumez  <cdumez@apple.com>
 
         Document title changed twice when setting document.title
index b519481..b839b3f 100644 (file)
@@ -50,7 +50,10 @@ class PiPSupport extends MediaControllerSupport
     syncControl()
     {
         const media = this.mediaController.media;
-        this.control.enabled = media instanceof HTMLVideoElement && media.webkitSupportsPresentationMode && media.webkitSupportsPresentationMode(PiPMode) && !media.webkitCurrentPlaybackTargetIsWireless;
+        if (media.webkitSupportsPresentationMode)
+            this.control.enabled = media instanceof HTMLVideoElement && media.webkitSupportsPresentationMode(PiPMode) && !media.webkitCurrentPlaybackTargetIsWireless;
+        else
+            this.control.enabled = false;
     }
 
 }
index f2e4885..65ac360 100644 (file)
@@ -1,3 +1,15 @@
+2017-01-17  Antoine Quint  <graouts@apple.com>
+
+        [Modern Media Controls] Turn modern media controls on by default
+        https://bugs.webkit.org/show_bug.cgi?id=165668
+
+        Reviewed by Dean Jackson.
+
+        Enabled modern media controls by default in WK1. 
+
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+
 2017-01-17  Joseph Pecoraro  <pecoraro@apple.com>
 
         ENABLE(USER_TIMING) Not Defined for Apple Windows or OS X Ports
index 8ce99d7..3dd105f 100644 (file)
@@ -613,6 +613,7 @@ public:
 #endif
         [NSNumber numberWithBool:YES], WebKitShadowDOMEnabledPreferenceKey,
         [NSNumber numberWithBool:YES], WebKitCustomElementsEnabledPreferenceKey,
+        [NSNumber numberWithBool:YES], WebKitModernMediaControlsEnabledPreferenceKey,
 #if ENABLE(WEBGL2)
         [NSNumber numberWithBool:NO], WebKitWebGL2EnabledPreferenceKey,
 #endif