DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (c68fe15a81fc)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
<!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 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>