summaryrefslogtreecommitdiffstats
path: root/layout/style/test/test_html_attribute_computed_values.html
blob: 74e5b9754a3ba9d4b66a4e1efe261277460370eb (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=
-->
<head>
  <title>Test for Bug </title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
<div id="content"></div>
<pre id="test">
<script type="application/javascript">


var gValues = [
  {
     element: "<li type='i'></li>",
     property: "list-style-type",
     value: "lower-roman"
  },
  {
     element: "<li type='I'></li>",
     property: "list-style-type",
     value: "upper-roman"
  },
  {
     element: "<li type='a'></li>",
     property: "list-style-type",
     value: "lower-alpha"
  },
  {
     element: "<li type='A'></li>",
     property: "list-style-type",
     value: "upper-alpha"
  },
  {
     element: "<li type='1'></li>",
     property: "list-style-type",
     value: "decimal"
  },
  {
     element: "<ol type='i'></ol>",
     property: "list-style-type",
     value: "lower-roman"
  },
  {
     element: "<ol type='I'></ol>",
     property: "list-style-type",
     value: "upper-roman"
  },
  {
     element: "<ol type='a'></ol>",
     property: "list-style-type",
     value: "lower-alpha"
  },
  {
     element: "<ol type='A'></ol>",
     property: "list-style-type",
     value: "upper-alpha"
  },
  {
     element: "<ol type='1'></ol>",
     property: "list-style-type",
     value: "decimal"
  },
];

var content = document.getElementById("content");
for (var i = 0; i < gValues.length; ++i) {
  var v = gValues[i];

  content.innerHTML = v.element;
  is(getComputedStyle(content.firstChild, "").getPropertyValue(v.property),
     v.value,
     v.property + " for " + v.element);
}

</script>
</pre>
</body>
</html>