3 <p>Tests that invalid media src url does not result in crash.</p>
4 <script src=video-test.js></script>
6 var invalid_url = "!:/" + String.fromCharCode(0) + "%aa#aa";
14 testExpected("audio.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
15 testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
16 testExpected("audio.networkState", HTMLMediaElement.NETWORK_NO_SOURCE);
17 testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE);
22 var audio = document.createElement('audio');
23 var video = document.createElement('video');
24 audio.src = invalid_url;
25 video.src = invalid_url;
26 audio.onerror = errorEvent;
27 video.onerror = errorEvent;
28 document.body.appendChild(audio);
29 document.body.appendChild(video);