diff options
Diffstat (limited to 'Tools/TestWebKitAPI/Tests/WebKit2/autoplay-check.html')
-rw-r--r-- | Tools/TestWebKitAPI/Tests/WebKit2/autoplay-check.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-check.html b/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-check.html new file mode 100644 index 000000000..ecc3c884e --- /dev/null +++ b/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-check.html @@ -0,0 +1,20 @@ +<html> + <head> + <script> + function pageLoaded() { + document.getElementById("video").play().then(function() { + try { + window.webkit.messageHandlers.testHandler.postMessage("autoplayed"); + } catch(e) { } + }).catch(function() { + try { + window.webkit.messageHandlers.testHandler.postMessage("did-not-play"); + } catch(e) { } + }); + } + </script> + </head> + <body onload="pageLoaded()"> + <video id="video" playsinline src="test.mp4" /> + </body> +</html> |