layout/base/crashtests/288790-1-inner.xhtml

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 <?xml version="1.0"?>
     2 <html xmlns="http://www.w3.org/1999/xhtml">
     3 <title>Testcase bug 288790 - Crash [@ GetNearestContainingBlock] with this xbl testcase</title>
     4 <head>
     5 <style>
     6 #z {position: relative;}
     7 #z span{position: absolute;}
     8 </style>
    10 <bindings xmlns="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml">
    11   <binding id="m"></binding>
    12   <binding id="ma" extends="#m">
    13     <content>
    14         <html:div><children/></html:div>
    15     </content>
    16   </binding>
    17 </bindings>
    19 </head>
    20 <body>
    21 <div id="z"><span></span></div>
    24 <script>
    25 function doe(){
    26 document.getElementById('z').setAttribute('style','-moz-binding:url(#ma)');
    27 setTimeout(doe2,0);
    28 }
    30 function doe2(){
    31 document.getElementsByTagName('span')[0].setAttribute('style','-moz-binding:url(#m)');
    32 }
    33 </script>
    34 <button id="button" onclick="doe()">Click me</button><br/>
    35 Clicking on the above button two times, should not crash Mozilla.
    36 <script>
    37 function clickbutton()
    38 {
    39   var ev = document.createEvent('MouseEvents');
    40   ev.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
    41   var button = document.getElementById('button');
    42   button.dispatchEvent(ev);
    43   button.dispatchEvent(ev);
    44 }
    45 clickbutton();
    46 </script>
    47 </body></html>

mercurial