4 <script src=video-test.js
></script>
8 function someTimeLater()
10 testExpected("state", "load() with missing 'src'");
11 testExpected("videos[0].error", null);
12 testExpected("videos[0].networkState", HTMLMediaElement
.NETWORK_EMPTY
);
13 testExpected("videos[0].src", "");
19 failTest("<br><i>***'error' event fired***<" + "/i>");
24 videos
= document
.querySelectorAll('video');
26 consoleWrite("<br><i>Network state should remain in NETWORK_EMPTY with missing 'src' attribute.<" + "/i>");
27 consoleWrite("** <video> with no src attribute**");
28 testExpected("videos[0].error", null);
29 testExpected("videos[0].networkState", HTMLMediaElement
.NETWORK_EMPTY
);
30 testExpected("videos[0].src", "");
32 consoleWrite("<br><i>Calling load() with no 'src' should NOT fire 'error' event, set network state to NETWORK_EMPTY.<" + "/i>");
33 state
= "load() with missing 'src'";
36 setTimeout(someTimeLater
, 100) ;
41 <body onload=
"setTimeout(test, 100)">
42 <video width=
320 height=
60 controls
onerror=
"errorEvent()"></video>