image/test/mochitest/test_ImageContentLoaded.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/image/test/mochitest/test_ImageContentLoaded.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=691610
     1.8 +-->
     1.9 +<head>
    1.10 +<title>Test for Bug 691610</title>
    1.11 +<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    1.13 +</head>
    1.14 +<body>
    1.15 +<script type="text/javascript">
    1.16 +    SimpleTest.waitForExplicitFinish()
    1.17 +
    1.18 +    SpecialPowers.addChromeEventListener("ImageContentLoaded", function () {
    1.19 +       ok(true, "chrome listener was invoked");
    1.20 +       SimpleTest.finish();
    1.21 +    }, true);
    1.22 +
    1.23 +    var iframe = document.createElement("iframe");
    1.24 +    iframe.src = "damon.jpg"
    1.25 +    document.body.appendChild(iframe);
    1.26 +    iframe.contentDocument.defaultView.addEventListener("ImageContentLoaded", function () {
    1.27 +        ok(false, "should not invoke event");
    1.28 +    }, true);
    1.29 +</script>
    1.30 +</body>
    1.31 +</html>

mercurial