2008-12-15 19:32:03 -08:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:svg="http://www.w3.org/2000/svg">
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=463162
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 463162</title>
|
|
|
|
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"/>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=463162">Mozilla Bug 463162</a>
|
2009-02-19 18:49:00 -08:00
|
|
|
|
2008-12-15 19:32:03 -08:00
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
<![CDATA[
|
2009-02-19 18:49:00 -08:00
|
|
|
|
|
|
|
var gExpectedResult = {
|
|
|
|
'a1' : 'error',
|
|
|
|
'a2' : 'loaded',
|
|
|
|
'a3' : 'loaded',
|
|
|
|
'a4' : 'error',
|
|
|
|
};
|
|
|
|
|
|
|
|
var gResultCount = 0;
|
|
|
|
|
|
|
|
function onError(event, id) {
|
|
|
|
event.stopPropagation();
|
|
|
|
is('error', gExpectedResult[id], 'unexpected error loading ' + id);
|
|
|
|
gResultCount++;
|
|
|
|
dump('error('+id+') expected ' + gExpectedResult[id] + ' gResultCount=' + gResultCount + '\n');
|
|
|
|
if (gResultCount == 4)
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
function onMetaData(id) {
|
|
|
|
is('loaded', gExpectedResult[id], 'unexpected loadedmetadata loading ' + id);
|
|
|
|
gResultCount++;
|
|
|
|
dump('onMetaData('+id+') expected ' + gExpectedResult[id] + ' gResultCount=' + gResultCount + '\n');
|
|
|
|
if (gResultCount == 4)
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
|
2008-12-15 19:32:03 -08:00
|
|
|
]]>
|
|
|
|
</script>
|
2009-02-19 18:49:00 -08:00
|
|
|
|
|
|
|
|
2009-03-08 13:59:08 -07:00
|
|
|
<audio id='a1' onerror="onError(event, 'a1');" onloadedmetadata="onMetaData('a1');"><sauce type="audio/x-wav" src="r11025_s16_c1.wav"/><source type="bad" src="404"/></audio>
|
2009-02-19 18:49:00 -08:00
|
|
|
<audio id='a2' onerror="onError(event, 'a2');" onloadedmetadata="onMetaData('a2');"><source type="audio/x-wav" src="r11025_s16_c1.wav"/></audio>
|
|
|
|
<audio id='a3' onerror="onError(event, 'a3');" onloadedmetadata="onMetaData('a3');"><html:source type="audio/x-wav" src="r11025_s16_c1.wav"/></audio>
|
2009-03-08 13:59:08 -07:00
|
|
|
<audio id='a4' onerror="onError(event, 'a4');" onloadedmetadata="onMetaData('a4');"><svg:source type="audio/x-wav" src="r11025_s16_c1.wav"/><source type="bad" src="404"/></audio>
|
2009-02-19 18:49:00 -08:00
|
|
|
|
|
|
|
<pre id="test">
|
|
|
|
|
2008-12-15 19:32:03 -08:00
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|