layout/reftests/mathml/maction-dynamic-1.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
     2 <head>
     3 <title>dynamic maction 1</title>
     4 </head>
     6 <body>
     8 <p>
     9 <math>
    10   <maction id="m1" actiontype="toggle">
    11     <mtext>__1__</mtext>
    12     <mtext>__2__</mtext>
    13   </maction>
    14 </math>
    15 </p>
    17 <p>
    18 <math>
    19   <maction id="m2" actiontype="toggle" selection="2">
    20     <mtext>__1__</mtext>
    21     <mtext>__2__</mtext>
    22   </maction>
    23 </math>
    24 </p>
    26 <p>
    27 <math>
    28   <maction id="m3" actiontype="toggle" selection="2">
    29     <mtext>__1__</mtext>
    30     <mtext>__2__</mtext>
    31   </maction>
    32 </math>
    33 </p>
    35 <p>
    36 <math>
    37   <maction id="m4" actiontype="toggle">
    38     <mn>1</mn>
    39     <mn>2</mn>
    40   </maction>
    41 </math>
    42 </p>
    44 <p>
    45 <math>
    46   <maction id="m5" actiontype="toggle">
    47     <mtext id="m51">__1__</mtext>
    48     <mtext id="m52">__2__</mtext>
    49     <mtext id="m53">__3__</mtext>
    50   </maction>
    51 </math>
    52 </p>
    54 <p>
    55 <math>
    56   <maction id="m6" actiontype="toggle" selection="3">
    57     <mtext>__1__</mtext>
    58     <mtext>__2__</mtext>
    59   </maction>
    60 </math>
    61 </p>
    63 <p>
    64 <math>
    65   <maction id="m7" actiontype="toggle">
    66     <mtext id="m71">__1__</mtext>
    67     <mtext id="m72">__2__</mtext>
    68   </maction>
    69 </math>
    70 </p>
    72 <p>
    73 <math>
    74   <maction id="m8" actiontype="toggle">
    75     <mtext id="m81">__1__</mtext>
    76     <mtext id="m82">__2__</mtext>
    77   </maction>
    78 </math>
    79 </p>
    81 <script>
    82 function doTest() {
    83   document.getElementById("m1").setAttribute("selection", "2");
    84   document.getElementById("m2").removeAttribute("selection");
    85   document.getElementById("m3").setAttribute("actiontype", "statusline");
    86   document.getElementById("m4").setAttribute("actiontype", "statusline");
    88   var child51 = document.getElementById("m51");
    89   document.getElementById("m5").removeChild(child51);
    91   var child53 = document.getElementById("m53");
    92   document.getElementById("m6").appendChild(child53.cloneNode(true));
    94   var child71 = document.getElementById("m71");
    95   document.getElementById("m7").insertBefore(child53.cloneNode(true), child71);
    97   var child81 = document.getElementById("m81");
    98   document.getElementById("m8").replaceChild(child53.cloneNode(true), child81);
   100   document.documentElement.removeAttribute('class');
   101 }
   102 window.addEventListener("MozReftestInvalidate", doTest, false);
   103 </script>
   105 </body>
   106 </html>

mercurial