diff options
Diffstat (limited to 'Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-paused-video-hides-controls.html')
| -rw-r--r-- | Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-paused-video-hides-controls.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-paused-video-hides-controls.html b/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-paused-video-hides-controls.html new file mode 100644 index 000000000..31f86cbc9 --- /dev/null +++ b/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-paused-video-hides-controls.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> +<style> + video { + width: 480px; + height: 320px; + } + #bar { + margin-top: 5000px; + } +</style> +<script> + function pauseFirstVideoAndScrollToSecondVideo() { + document.querySelector("#bar").scrollIntoView(); + document.querySelector("#foo").pause(); + } + function handlePaused() { + setTimeout(function() { + try { + window.webkit.messageHandlers.testHandler.postMessage("paused"); + } catch(e) { } + }, 0); + } + function beganAutoplaying() { + setTimeout(function() { + try { + window.webkit.messageHandlers.testHandler.postMessage("autoplayed"); + } catch(e) { + } + }, 0) + } +</script> +<body> + <video autoplay onplaying=beganAutoplaying() loop id="foo" onpause=handlePaused()><source src="large-video-with-audio.mp4"></video> + <br> + <video id="bar"><source src="large-video-with-audio.mp4"></video> +</body> +<html>
\ No newline at end of file |
