Source code

Revision control

Other Tools

Test Info: Warnings

  • This test gets skipped with pattern: (os == "win" && processor == "aarch64")
<!DOCTYPE HTML>
<html>
<!--
Adapted from:
-->
<head>
<title>Media test: constants</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<video><source></video><audio><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_NO_SOURCE, 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(HTMLElement.MEDIA_ERR_ABORTED, undefined);
is(HTMLElement.MEDIA_ERR_NETWORK, undefined);
is(HTMLElement.MEDIA_ERR_DECODE, undefined);
is(HTMLElement.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(HTMLMediaElement.NETWORK_EMPTY, 0);
is(HTMLMediaElement.NETWORK_IDLE, 1);
is(HTMLMediaElement.NETWORK_LOADING, 2);
is(HTMLMediaElement.NETWORK_NO_SOURCE, 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(HTMLMediaElement.MEDIA_ERR_ABORTED, undefined);
is(HTMLMediaElement.MEDIA_ERR_NETWORK, undefined);
is(HTMLMediaElement.MEDIA_ERR_DECODE, undefined);
is(HTMLMediaElement.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(HTMLVideoElement.NETWORK_EMPTY, 0);
is(HTMLVideoElement.NETWORK_IDLE, 1);
is(HTMLVideoElement.NETWORK_LOADING, 2);
is(HTMLVideoElement.NETWORK_NO_SOURCE, 3);
is(HTMLVideoElement.HAVE_NOTHING, 0);
is(HTMLVideoElement.HAVE_METADATA, 1);
is(HTMLVideoElement.HAVE_CURRENT_DATA, 2);
is(HTMLVideoElement.HAVE_FUTURE_DATA, 3);
is(HTMLVideoElement.HAVE_ENOUGH_DATA, 4);
is(HTMLVideoElement.MEDIA_ERR_ABORTED, undefined);
is(HTMLVideoElement.MEDIA_ERR_NETWORK, undefined);
is(HTMLVideoElement.MEDIA_ERR_DECODE, undefined);
is(HTMLVideoElement.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(HTMLAudioElement.NETWORK_EMPTY, 0);
is(HTMLAudioElement.NETWORK_IDLE, 1);
is(HTMLAudioElement.NETWORK_LOADING, 2);
is(HTMLAudioElement.NETWORK_NO_SOURCE, 3);
is(HTMLAudioElement.HAVE_NOTHING, 0);
is(HTMLAudioElement.HAVE_METADATA, 1);
is(HTMLAudioElement.HAVE_CURRENT_DATA, 2);
is(HTMLAudioElement.HAVE_FUTURE_DATA, 3);
is(HTMLAudioElement.HAVE_ENOUGH_DATA, 4);
is(HTMLAudioElement.MEDIA_ERR_ABORTED, undefined);
is(HTMLAudioElement.MEDIA_ERR_NETWORK, undefined);
is(HTMLAudioElement.MEDIA_ERR_DECODE, undefined);
is(HTMLAudioElement.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(HTMLSourceElement.NETWORK_EMPTY, undefined);
is(HTMLSourceElement.NETWORK_IDLE, undefined);
is(HTMLSourceElement.NETWORK_LOADING, undefined);
is(HTMLSourceElement.NETWORK_NO_SOURCE, 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(HTMLSourceElement.MEDIA_ERR_ABORTED, undefined);
is(HTMLSourceElement.MEDIA_ERR_NETWORK, undefined);
is(HTMLSourceElement.MEDIA_ERR_DECODE, undefined);
is(HTMLSourceElement.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(MediaError.NETWORK_EMPTY, undefined);
is(MediaError.NETWORK_IDLE, undefined);
is(MediaError.NETWORK_LOADING, undefined);
is(MediaError.NETWORK_NO_SOURCE, undefined);
is(MediaError.HAVE_NOTHING, undefined);
is(MediaError.HAVE_METADATA, undefined);
is(MediaError.HAVE_CURRENT_DATA, undefined);
is(MediaError.HAVE_FUTURE_DATA, undefined);
is(MediaError.HAVE_ENOUGH_DATA, undefined);
is(MediaError.MEDIA_ERR_ABORTED, 1);
is(MediaError.MEDIA_ERR_NETWORK, 2);
is(MediaError.MEDIA_ERR_DECODE, 3);
is(MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED, 4);
is(document.body.NETWORK_EMPTY, undefined);
is(document.body.NETWORK_IDLE, undefined);
is(document.body.NETWORK_LOADING, undefined);
is(document.body.NETWORK_NO_SOURCE, 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.body.MEDIA_ERR_ABORTED, undefined);
is(document.body.MEDIA_ERR_NETWORK, undefined);
is(document.body.MEDIA_ERR_DECODE, undefined);
is(document.body.MEDIA_ERR_SRC_NOT_SUPPORTED, 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_NO_SOURCE, 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("video")[0].MEDIA_ERR_ABORTED, undefined);
is(document.getElementsByTagName("video")[0].MEDIA_ERR_NETWORK, undefined);
is(document.getElementsByTagName("video")[0].MEDIA_ERR_DECODE, undefined);
is(document.getElementsByTagName("video")[0].MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
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_NO_SOURCE, 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("audio")[0].MEDIA_ERR_ABORTED, undefined);
is(document.getElementsByTagName("audio")[0].MEDIA_ERR_NETWORK, undefined);
is(document.getElementsByTagName("audio")[0].MEDIA_ERR_DECODE, undefined);
is(document.getElementsByTagName("audio")[0].MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
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_NO_SOURCE, 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(document.getElementsByTagName("source")[0].MEDIA_ERR_ABORTED, undefined);
is(document.getElementsByTagName("source")[0].MEDIA_ERR_NETWORK, undefined);
is(document.getElementsByTagName("source")[0].MEDIA_ERR_DECODE, undefined);
is(document.getElementsByTagName("source")[0].MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(HTMLElement.prototype.NETWORK_EMPTY, undefined);
is(HTMLElement.prototype.NETWORK_IDLE, undefined);
is(HTMLElement.prototype.NETWORK_LOADING, undefined);
is(HTMLElement.prototype.NETWORK_NO_SOURCE, 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);
is(HTMLElement.prototype.MEDIA_ERR_ABORTED, undefined);
is(HTMLElement.prototype.MEDIA_ERR_NETWORK, undefined);
is(HTMLElement.prototype.MEDIA_ERR_DECODE, undefined);
is(HTMLElement.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(HTMLMediaElement.prototype.NETWORK_EMPTY, 0, "HTMLMediaElement.prototype.NETWORK_EMPTY");
is(HTMLMediaElement.prototype.NETWORK_IDLE, 1, "HTMLMediaElement.prototype.NETWORK_IDLE");
is(HTMLMediaElement.prototype.NETWORK_LOADING, 2, "HTMLMediaElement.prototype.NETWORK_LOADING");
is(HTMLMediaElement.prototype.NETWORK_NO_SOURCE, 3, "HTMLMediaElement.prototype.NETWORK_NO_SOURCE");
is(HTMLMediaElement.prototype.HAVE_NOTHING, 0, "HTMLMediaElement.prototype.HAVE_NOTHING");
is(HTMLMediaElement.prototype.HAVE_METADATA, 1, "HTMLMediaElement.prototype.HAVE_METADATA");
is(HTMLMediaElement.prototype.HAVE_CURRENT_DATA, 2, "HTMLMediaElement.prototype.HAVE_CURRENT_DATA");
is(HTMLMediaElement.prototype.HAVE_FUTURE_DATA, 3, "HTMLMediaElement.prototype.HAVE_FUTURE_DATA");
is(HTMLMediaElement.prototype.HAVE_ENOUGH_DATA, 4, "HTMLMediaElement.prototype.HAVE_ENOUGH_DATA");
is(HTMLMediaElement.prototype.MEDIA_ERR_ABORTED, undefined, "HTMLMediaElement.prototype.MEDIA_ERR_ABORTED");
is(HTMLMediaElement.prototype.MEDIA_ERR_NETWORK, undefined, "HTMLMediaElement.prototype.MEDIA_ERR_NETWORK");
is(HTMLMediaElement.prototype.MEDIA_ERR_DECODE, undefined, "HTMLMediaElement.prototype.MEDIA_ERR_DECODE");
is(HTMLMediaElement.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined, "HTMLMediaElement.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED");
is(HTMLVideoElement.prototype.NETWORK_EMPTY, 0);
is(HTMLVideoElement.prototype.NETWORK_IDLE, 1);
is(HTMLVideoElement.prototype.NETWORK_LOADING, 2);
is(HTMLVideoElement.prototype.NETWORK_NO_SOURCE, 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(HTMLVideoElement.prototype.MEDIA_ERR_ABORTED, undefined);
is(HTMLVideoElement.prototype.MEDIA_ERR_NETWORK, undefined);
is(HTMLVideoElement.prototype.MEDIA_ERR_DECODE, undefined);
is(HTMLVideoElement.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(HTMLAudioElement.prototype.NETWORK_EMPTY, 0);
is(HTMLAudioElement.prototype.NETWORK_IDLE, 1);
is(HTMLAudioElement.prototype.NETWORK_LOADING, 2);
is(HTMLAudioElement.prototype.NETWORK_NO_SOURCE, 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(HTMLAudioElement.prototype.MEDIA_ERR_ABORTED, undefined);
is(HTMLAudioElement.prototype.MEDIA_ERR_NETWORK, undefined);
is(HTMLAudioElement.prototype.MEDIA_ERR_DECODE, undefined);
is(HTMLAudioElement.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(HTMLSourceElement.prototype.NETWORK_EMPTY, undefined);
is(HTMLSourceElement.prototype.NETWORK_IDLE, undefined);
is(HTMLSourceElement.prototype.NETWORK_LOADING, undefined);
is(HTMLSourceElement.prototype.NETWORK_NO_SOURCE, 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);
is(HTMLSourceElement.prototype.MEDIA_ERR_ABORTED, undefined);
is(HTMLSourceElement.prototype.MEDIA_ERR_NETWORK, undefined);
is(HTMLSourceElement.prototype.MEDIA_ERR_DECODE, undefined);
is(HTMLSourceElement.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
is(MediaError.prototype.NETWORK_EMPTY, undefined);
is(MediaError.prototype.NETWORK_IDLE, undefined);
is(MediaError.prototype.NETWORK_LOADING, undefined);
is(MediaError.prototype.NETWORK_NO_SOURCE, undefined);
is(MediaError.prototype.HAVE_NOTHING, undefined);
is(MediaError.prototype.HAVE_METADATA, undefined);
is(MediaError.prototype.HAVE_CURRENT_DATA, undefined);
is(MediaError.prototype.HAVE_FUTURE_DATA, undefined);
is(MediaError.prototype.HAVE_ENOUGH_DATA, undefined);
is(MediaError.prototype.MEDIA_ERR_ABORTED, 1);
is(MediaError.prototype.MEDIA_ERR_NETWORK, 2);
is(MediaError.prototype.MEDIA_ERR_DECODE, 3);
is(MediaError.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, 4);
ok(document.getElementsByTagName("video")[0].buffered instanceof TimeRanges, "video.buffered must be TimeRanges object");
</script>
</pre>
</body>
</html>