blob: 367f55a8decac820980b7ab1042e72e11051694f [file] [log] [blame]
<html>
<head>
<script src=video-test.js></script>
<script>
if (window.testRunner) {
internals.settings.setVideoPlaybackRequiresUserGesture(true);
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
var video
window.onload = () => {
video = document.getElementsByTagName("video")[0];
var source = document.createElement("source");
source.src = "source.mp4";
video.appendChild(source);
video.src = "src.mp4";
setTimeout(()=>{
testExpected("relativeURL(video.currentSrc)", "");
if (window.testRunner)
testRunner.notifyDone();
}, 1);
}
</script>
</head>
<body>
Append source element before setting src attribute.<br>
Platforms that support setVideoPlaybackRequiresUserGesture
will have the expected, empty, currentSrc. Platforms that don't should
have the unexpected "src.mp4".<br>
<video width=320 height=240></video>
</body>
</html>