blob: 59d5a36ffd3c8103b3f78628bb9aeab9acc4b03d [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>video-add-autoplay-user-gesture</title>
<script src=media-file.js></script>
<script src=video-test.js></script>
<script>
function runTest() {
run('window.internals.settings.setVideoPlaybackRequiresUserGesture(true);');
run('video = document.createElement("video")');
run('video.src = findMediaFile("video", "content/test")');
runWithKeyDown(() => {
run('video.setAttribute("autoplay", "")');
run('document.body.appendChild(video)');
waitForEventAndEnd('playing');
failTestIn(1000);
});
}
</script>
</head>
<body onload="runTest()">
</body>
</html>