Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Disable m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause
https://bugs.webkit.org/show_bug.cgi?id=173843 rdar://problem/32982431 Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-27 Reviewed by Eric Carlson. Source/WebCore: Test: media/media-fullscreen-pause-inline.html Some pages may not have a fullscreen button, so disabled m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::pause): LayoutTests: Some pages may not have a fullscreen button, so disabled m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause. * media/media-fullscreen-pause-inline-expected.txt: Added. * media/media-fullscreen-pause-inline.html: Added. * platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/190724@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
73a2b78
commit 22119d1d901dea5d469e11a54e56d1f6ef4c6021
Showing
6 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
RUN(internals.settings.setAllowsInlineMediaPlayback(false)) | ||
RUN(internals.settings.setAllowsInlineMediaPlaybackAfterFullscreen(true)) | ||
RUN(internals.settings.setFullScreenEnabled(false)) | ||
RUN(internals.setMediaElementRestrictions(video, "NoRestrictions")) | ||
RUN(video.src = findMediaFile("video", "content/test")) | ||
RUN(video.play().then(playing);) | ||
EXPECTED (video.webkitDisplayingFullscreen == 'true') OK | ||
RUN(video.webkitExitFullscreen()) | ||
EVENT(webkitendfullscreen) | ||
EXPECTED (video.paused == 'false') OK | ||
RUN(video.pause()) | ||
EVENT(pause) | ||
EXPECTED (video.paused == 'true') OK | ||
RUN(video.play().then(playingAgain)) | ||
EXPECTED (video.webkitDisplayingFullscreen == 'true') OK | ||
END OF TEST | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] --> | ||
<html> | ||
<head> | ||
<title>media-fullscreen-return-to-inline</title> | ||
|
||
<script src="video-test.js"></script> | ||
<script src="media-file.js"></script> | ||
|
||
<script> | ||
function go() | ||
{ | ||
findMediaElement(); | ||
run('internals.settings.setAllowsInlineMediaPlayback(false)'); | ||
run('internals.settings.setAllowsInlineMediaPlaybackAfterFullscreen(true)'); | ||
run('internals.settings.setFullScreenEnabled(false)'); | ||
run('internals.setMediaElementRestrictions(video, "NoRestrictions")'); | ||
run('video.src = findMediaFile("video", "content/test")'); | ||
run('video.play().then(playing);'); | ||
} | ||
|
||
function playing() | ||
{ | ||
testExpected('video.webkitDisplayingFullscreen', true); | ||
waitForEventOnce('webkitendfullscreen', endfullscreen); | ||
run('video.webkitExitFullscreen()'); | ||
} | ||
|
||
function endfullscreen() | ||
{ | ||
testExpected('video.paused', false); | ||
run('video.pause()'); | ||
waitForEventOnce('pause', paused); | ||
} | ||
|
||
function paused() | ||
{ | ||
testExpected('video.paused', true); | ||
setTimeout(function(){ run('video.play().then(playingAgain)');}, 0) | ||
} | ||
|
||
function playingAgain() | ||
{ | ||
|
||
testExpected('video.webkitDisplayingFullscreen', true); | ||
endTest(); | ||
} | ||
|
||
</script> | ||
|
||
</head> | ||
|
||
<body onload="go()"> | ||
<video controls></video> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters