dom/bindings/test/test_treat_non_object_as_null.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=952365
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 952365</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11   <script type="application/javascript">
    13   /** Test for Bug 952365 **/
    15     var onvolumechange;
    16     var x = {};
    18     (function() {
    19        onvolumechange = x;
    20        ise(onvolumechange, x,
    21            "Should preserve an object value when assigning to event handler");
    22        // Test that we don't try to actually call the non-callable object
    23        window.dispatchEvent(new Event("volumechange"));
    24        onvolumechange = 5;
    25        ise(onvolumechange, null,
    26            "Non-object values should become null when assigning to event handler");
    27     })();
    28   </script>
    29 </head>
    30 <body>
    31 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=952365">Mozilla Bug 952365</a>
    32 <p id="display"></p>
    33 <div id="content" style="display: none">
    35 </div>
    36 <pre id="test">
    37 </pre>
    38 </body>
    39 </html>

mercurial