33 lines
832 B
HTML
33 lines
832 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() {
|
|
run('internals.settings.setAllowsInlineMediaPlayback(false)');
|
|
video = document.createElement('video');
|
|
document.body.appendChild(video);
|
|
|
|
video.src = findMediaFile('video', 'content/test');
|
|
waitForEvent('canplaythrough', canPlayThrough);
|
|
}
|
|
|
|
function canPlayThrough() {
|
|
var promise = video.play();
|
|
waitForEventAndFail('playing');
|
|
setTimeout(didNotPlay, 100);
|
|
promise.catch(didNotPlay);
|
|
}
|
|
|
|
function didNotPlay() {
|
|
logResult(true, "Video did not begin playing");
|
|
endTest();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="go()">
|
|
</body>
|
|
</html>
|