35 lines
992 B
HTML
35 lines
992 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src=media-file.js></script>
|
|
<script src=video-test.js></script>
|
|
<script>
|
|
function error()
|
|
{
|
|
testExpected('video.currentSrc', '');
|
|
consoleWrite('');
|
|
endTest();
|
|
}
|
|
|
|
function canplaythrough()
|
|
{
|
|
testExpected('video.currentSrc.indexOf("content/test")', -1, '>');
|
|
run('video.src = ""');
|
|
consoleWrite('');
|
|
}
|
|
|
|
function start()
|
|
{
|
|
findMediaElement();
|
|
waitForEvent('error', error);
|
|
waitForEvent('canplaythrough', canplaythrough);
|
|
video.src = findMediaFile("video", "content/test");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="start()">
|
|
<video ></video>
|
|
<p>Check that 'currentsrc' is cleared when there is no media resource.</p>
|
|
</body>
|
|
</html>
|