Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / invalid-media-url-crash.html
blob42540b70f646f4dafec1aff7ff6a09ea60366562
1 <html>
2 <body>
3 <p>Tests that invalid media src url does not result in crash.</p>
4 <script src=video-test.js></script>
5 <script>
6 var invalid_url = "!:/" + String.fromCharCode(0) + "%aa#aa";
7 var error_count = 0;
9 function errorEvent()
11 error_count++;
12 if (error_count == 2)
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);
18 endTest();
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);
30 </script>
31 </body>
32 </html>