image/test/mochitest/test_ImageContentLoaded.html

branch
TOR_BUG_9701
changeset 14
925c144e1f1f
equal deleted inserted replaced
-1:000000000000 0:4b4c9bbf46af
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=691610
5 -->
6 <head>
7 <title>Test for Bug 691610</title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
10 </head>
11 <body>
12 <script type="text/javascript">
13 SimpleTest.waitForExplicitFinish()
14
15 SpecialPowers.addChromeEventListener("ImageContentLoaded", function () {
16 ok(true, "chrome listener was invoked");
17 SimpleTest.finish();
18 }, true);
19
20 var iframe = document.createElement("iframe");
21 iframe.src = "damon.jpg"
22 document.body.appendChild(iframe);
23 iframe.contentDocument.defaultView.addEventListener("ImageContentLoaded", function () {
24 ok(false, "should not invoke event");
25 }, true);
26 </script>
27 </body>
28 </html>

mercurial