gecko/content/media/video/test/test_constants.html

148 lines
7.6 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML>
<html>
<!--
Adapted from:
http://simon.html5.org/test/html/dom/interfaces/htmlelement/htmlmediaelement/const-unsigned-short/001.htm
-->
<head>
<title>Media test: constants</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<video onerror="event.stopPropagation();"><source></video><audio onerror="event.stopPropagation();"><source></audio>
<pre id="test">
<script class="testbody" type="text/javascript">
is(HTMLElement.NETWORK_EMPTY, undefined);
is(HTMLElement.NETWORK_IDLE, undefined);
is(HTMLElement.NETWORK_LOADING, undefined);
is(HTMLElement.NETWORK_LOADED, undefined);
is(HTMLElement.HAVE_NOTHING, undefined);
is(HTMLElement.HAVE_METADATA, undefined);
is(HTMLElement.HAVE_CURRENT_DATA, undefined);
is(HTMLElement.HAVE_FUTURE_DATA, undefined);
is(HTMLElement.HAVE_ENOUGH_DATA, undefined);
is(HTMLMediaElement.NETWORK_EMPTY, 0);
is(HTMLMediaElement.NETWORK_IDLE, 1);
is(HTMLMediaElement.NETWORK_LOADING, 2);
is(HTMLMediaElement.NETWORK_LOADED, 3);
is(HTMLMediaElement.HAVE_NOTHING, 0);
is(HTMLMediaElement.HAVE_METADATA, 1);
is(HTMLMediaElement.HAVE_CURRENT_DATA, 2);
is(HTMLMediaElement.HAVE_FUTURE_DATA, 3);
is(HTMLMediaElement.HAVE_ENOUGH_DATA, 4);
is(HTMLVideoElement.NETWORK_EMPTY, undefined);
is(HTMLVideoElement.NETWORK_IDLE, undefined);
is(HTMLVideoElement.NETWORK_LOADING, undefined);
is(HTMLVideoElement.NETWORK_LOADED, undefined);
is(HTMLVideoElement.HAVE_NOTHING, undefined);
is(HTMLVideoElement.HAVE_METADATA, undefined);
is(HTMLVideoElement.HAVE_CURRENT_DATA, undefined);
is(HTMLVideoElement.HAVE_FUTURE_DATA, undefined);
is(HTMLVideoElement.HAVE_ENOUGH_DATA, undefined);
is(HTMLAudioElement.NETWORK_EMPTY, undefined);
is(HTMLAudioElement.NETWORK_IDLE, undefined);
is(HTMLAudioElement.NETWORK_LOADING, undefined);
is(HTMLAudioElement.NETWORK_LOADED, undefined);
is(HTMLAudioElement.HAVE_NOTHING, undefined);
is(HTMLAudioElement.HAVE_METADATA, undefined);
is(HTMLAudioElement.HAVE_CURRENT_DATA, undefined);
is(HTMLAudioElement.HAVE_FUTURE_DATA, undefined);
is(HTMLAudioElement.HAVE_ENOUGH_DATA, undefined);
is(HTMLSourceElement.NETWORK_EMPTY, undefined);
is(HTMLSourceElement.NETWORK_IDLE, undefined);
is(HTMLSourceElement.NETWORK_LOADING, undefined);
is(HTMLSourceElement.NETWORK_LOADED, undefined);
is(HTMLSourceElement.HAVE_NOTHING, undefined);
is(HTMLSourceElement.HAVE_METADATA, undefined);
is(HTMLSourceElement.HAVE_CURRENT_DATA, undefined);
is(HTMLSourceElement.HAVE_FUTURE_DATA, undefined);
is(HTMLSourceElement.HAVE_ENOUGH_DATA, undefined);
is(document.body.NETWORK_EMPTY, undefined);
is(document.body.NETWORK_IDLE, undefined);
is(document.body.NETWORK_LOADING, undefined);
is(document.body.NETWORK_LOADED, undefined);
is(document.body.HAVE_NOTHING, undefined);
is(document.body.HAVE_METADATA, undefined);
is(document.body.HAVE_CURRENT_DATA, undefined);
is(document.body.HAVE_FUTURE_DATA, undefined);
is(document.body.HAVE_ENOUGH_DATA, undefined);
is(document.getElementsByTagName("video")[0].NETWORK_EMPTY, 0);
is(document.getElementsByTagName("video")[0].NETWORK_IDLE, 1);
is(document.getElementsByTagName("video")[0].NETWORK_LOADING, 2);
is(document.getElementsByTagName("video")[0].NETWORK_LOADED, 3);
is(document.getElementsByTagName("video")[0].HAVE_NOTHING, 0);
is(document.getElementsByTagName("video")[0].HAVE_METADATA, 1);
is(document.getElementsByTagName("video")[0].HAVE_CURRENT_DATA, 2);
is(document.getElementsByTagName("video")[0].HAVE_FUTURE_DATA, 3);
is(document.getElementsByTagName("video")[0].HAVE_ENOUGH_DATA, 4);
is(document.getElementsByTagName("audio")[0].NETWORK_EMPTY, 0);
is(document.getElementsByTagName("audio")[0].NETWORK_IDLE, 1);
is(document.getElementsByTagName("audio")[0].NETWORK_LOADING, 2);
is(document.getElementsByTagName("audio")[0].NETWORK_LOADED, 3);
is(document.getElementsByTagName("audio")[0].HAVE_NOTHING, 0);
is(document.getElementsByTagName("audio")[0].HAVE_METADATA, 1);
is(document.getElementsByTagName("audio")[0].HAVE_CURRENT_DATA, 2);
is(document.getElementsByTagName("audio")[0].HAVE_FUTURE_DATA, 3);
is(document.getElementsByTagName("audio")[0].HAVE_ENOUGH_DATA, 4);
is(document.getElementsByTagName("source")[0].NETWORK_EMPTY, undefined);
is(document.getElementsByTagName("source")[0].NETWORK_IDLE, undefined);
is(document.getElementsByTagName("source")[0].NETWORK_LOADING, undefined);
is(document.getElementsByTagName("source")[0].NETWORK_LOADED, undefined);
is(document.getElementsByTagName("source")[0].HAVE_NOTHING, undefined);
is(document.getElementsByTagName("source")[0].HAVE_METADATA, undefined);
is(document.getElementsByTagName("source")[0].HAVE_CURRENT_DATA, undefined);
is(document.getElementsByTagName("source")[0].HAVE_FUTURE_DATA, undefined);
is(document.getElementsByTagName("source")[0].HAVE_ENOUGH_DATA, undefined);
is(HTMLElement.prototype.NETWORK_EMPTY, undefined);
is(HTMLElement.prototype.NETWORK_IDLE, undefined);
is(HTMLElement.prototype.NETWORK_LOADING, undefined);
is(HTMLElement.prototype.NETWORK_LOADED, undefined);
is(HTMLElement.prototype.HAVE_NOTHING, undefined);
is(HTMLElement.prototype.HAVE_METADATA, undefined);
is(HTMLElement.prototype.HAVE_CURRENT_DATA, undefined);
is(HTMLElement.prototype.HAVE_FUTURE_DATA, undefined);
is(HTMLElement.prototype.HAVE_ENOUGH_DATA, undefined);
todo_is(HTMLMediaElement.prototype.NETWORK_EMPTY, 0, "HTMLMediaElement.prototype.NETWORK_EMPTY");
todo_is(HTMLMediaElement.prototype.NETWORK_IDLE, 1, "HTMLMediaElement.prototype.NETWORK_IDLE");
todo_is(HTMLMediaElement.prototype.NETWORK_LOADING, 2, "HTMLMediaElement.prototype.NETWORK_LOADING");
todo_is(HTMLMediaElement.prototype.NETWORK_LOADED, 3, "HTMLMediaElement.prototype.NETWORK_LOADED");
todo_is(HTMLMediaElement.prototype.HAVE_NOTHING, 0, "HTMLMediaElement.prototype.HAVE_NOTHING");
todo_is(HTMLMediaElement.prototype.HAVE_METADATA, 1, "HTMLMediaElement.prototype.HAVE_METADATA");
todo_is(HTMLMediaElement.prototype.HAVE_CURRENT_DATA, 2, "HTMLMediaElement.prototype.HAVE_CURRENT_DATA");
todo_is(HTMLMediaElement.prototype.HAVE_FUTURE_DATA, 3, "HTMLMediaElement.prototype.HAVE_FUTURE_DATA");
todo_is(HTMLMediaElement.prototype.HAVE_ENOUGH_DATA, 4, "HTMLMediaElement.prototype.HAVE_ENOUGH_DATA");
is(HTMLVideoElement.prototype.NETWORK_EMPTY, 0);
is(HTMLVideoElement.prototype.NETWORK_IDLE, 1);
is(HTMLVideoElement.prototype.NETWORK_LOADING, 2);
is(HTMLVideoElement.prototype.NETWORK_LOADED, 3);
is(HTMLVideoElement.prototype.HAVE_NOTHING, 0);
is(HTMLVideoElement.prototype.HAVE_METADATA, 1);
is(HTMLVideoElement.prototype.HAVE_CURRENT_DATA, 2);
is(HTMLVideoElement.prototype.HAVE_FUTURE_DATA, 3);
is(HTMLVideoElement.prototype.HAVE_ENOUGH_DATA, 4);
is(HTMLAudioElement.prototype.NETWORK_EMPTY, 0);
is(HTMLAudioElement.prototype.NETWORK_IDLE, 1);
is(HTMLAudioElement.prototype.NETWORK_LOADING, 2);
is(HTMLAudioElement.prototype.NETWORK_LOADED, 3);
is(HTMLAudioElement.prototype.HAVE_NOTHING, 0);
is(HTMLAudioElement.prototype.HAVE_METADATA, 1);
is(HTMLAudioElement.prototype.HAVE_CURRENT_DATA, 2);
is(HTMLAudioElement.prototype.HAVE_FUTURE_DATA, 3);
is(HTMLAudioElement.prototype.HAVE_ENOUGH_DATA, 4);
is(HTMLSourceElement.prototype.NETWORK_EMPTY, undefined);
is(HTMLSourceElement.prototype.NETWORK_IDLE, undefined);
is(HTMLSourceElement.prototype.NETWORK_LOADING, undefined);
is(HTMLSourceElement.prototype.NETWORK_LOADED, undefined);
is(HTMLSourceElement.prototype.HAVE_NOTHING, undefined);
is(HTMLSourceElement.prototype.HAVE_METADATA, undefined);
is(HTMLSourceElement.prototype.HAVE_CURRENT_DATA, undefined);
is(HTMLSourceElement.prototype.HAVE_FUTURE_DATA, undefined);
is(HTMLSourceElement.prototype.HAVE_ENOUGH_DATA, undefined);
</script>
</pre>
</body>
</html>