4 https://bugzilla.mozilla.org/show_bug.cgi?id=1094549
7 <title>Test for Bug
1094549</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
10 <script type=
"text/javascript" src=
"manifest.js"></script>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1094549">Mozilla Bug
1094549</a>
16 <div id=
"content" style=
"display: none">
20 <script type=
"application/javascript">
22 // Shorter timeout for this test should finish soon.
23 SimpleTest.requestLongerTimeout(
0.3);
26 isnot(v.error, null,
"should've got an error event");
31 info(
"iframe loaded");
32 var v = SpecialPowers.wrap(document.body.getElementsByTagName(
"iframe")[
0])
33 .contentDocument.body.getElementsByTagName(
"video")[
0];
35 // Got 'error' as expected, finish the test.
41 // Otherwise, wait for it.
42 v.onerror = function() {
47 SimpleTest.waitForExplicitFinish();
48 var f = document.createElement(
"iframe");
49 // Assign a resource file with zero length and expect the error event from
50 // the video element since decoding metadata will fail.
51 f.src =
"data:video/webm,";
52 f.addEventListener(
"load", onload);
53 document.body.appendChild(f);