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

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

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

mercurial