37 lines
944 B
HTML
37 lines
944 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>video-main-content-allow</title>
|
|
<script src="video-test.js"></script>
|
|
<script src="media-file.js"></script>
|
|
<script>
|
|
function go() {
|
|
video = document.createElement('video');
|
|
run('internals.setMediaElementRestrictions(video, "RequireUserGestureForVideoRateChange,OverrideUserGestureRequirementForMainContent")');
|
|
document.body.appendChild(video);
|
|
|
|
video.src = findMediaFile('video', 'content/test');
|
|
waitForEvent('canplaythrough', canPlayThrough);
|
|
}
|
|
|
|
function canPlayThrough() {
|
|
video.play();
|
|
waitForEvent('playing', playing);
|
|
}
|
|
|
|
function playing() {
|
|
run('video.style.visibility = "hidden"');
|
|
waitForEventAndEnd('pause');
|
|
failTestIn(500);
|
|
}
|
|
</script>
|
|
<style>
|
|
video {
|
|
width: 600px;
|
|
height: 400px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body onload="go()">
|
|
</body>
|
|
</html> |