image/test/mochitest/test_ImageContentLoaded.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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()
    15     SpecialPowers.addChromeEventListener("ImageContentLoaded", function () {
    16        ok(true, "chrome listener was invoked");
    17        SimpleTest.finish();
    18     }, true);
    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