summaryrefslogtreecommitdiffstats
path: root/layout/reftests/mathml/maction-dynamic-embellished-op.html
blob: 4ebf29ed1a83f397c971f8a013414c175c73ef71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html class="reftest-wait">

<head>
<title>dynamic maction and embellished op</title>
</head>

<body>

  <p>'<math><maction id="m1"><mi>a</mi><mo>b</mo></maction></math>'</p>
  <p>'<math><maction id="m2"><mo>b</mo><mi>a</mi></maction></math>'</p>
 
  <p>"<math><maction id="m3"><mi>a</mi><mo>b</mo></maction></math>"</p>
  <p>"<math><maction id="m3bis"><mo>b</mo></maction></math>"</p>

  <p>{<math><maction id="m4"><mo>b</mo><mi>a</mi></maction></math>}</p>
  <p>{<math><maction id="m4bis"><mi>a</mi></maction></math>}</p>

 
  <p>[<math>
    <mstyle id="m5"><maction><mi>a</mi><mo>b</mo></maction></mstyle>
  </math>]</p>
  <p>[<math>
    <mstyle id="m6"><maction><mo>b</mo><mi>a</mi></maction></mstyle>
  </math>]</p>

  <p>(<math id="m7"><maction><mi>a</mi><mo>b</mo></maction></math>)</p>
  <p>(<math id="m8"><maction><mo>b</mo><mi>a</mi></maction></math>)</p>

<script>
function doTest()
{
  document.getElementById("m1").setAttribute("selection", "2");
  document.getElementById("m2").setAttribute("selection", "2");

  var m3 = document.getElementById("m3");
  var m3bis = document.getElementById("m3bis");
  m3bis.insertBefore(m3.removeChild(m3.firstChild), m3bis.firstChild);

  var m4 = document.getElementById("m4");
  var m4bis = document.getElementById("m4bis");
  m4bis.insertBefore(m4.removeChild(m4.firstChild), m4bis.firstChild);

  document.getElementById("m5").setAttribute("selection", "2");
  document.getElementById("m6").setAttribute("selection", "2");

  document.getElementById("m7").setAttribute("selection", "2");
  document.getElementById("m8").setAttribute("selection", "2");

  document.documentElement.removeAttribute("class");
}

window.addEventListener("MozReftestInvalidate", doTest, false);
</script>

</body>
</html>