4 <title>Test for serialization and equivalence of angle units
</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
9 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug
</a>
11 <div id=
"content" style=
"display: none">
15 <script type=
"application/javascript">
17 /** Test for serialization and equivalence of angle units **/
20 * We test that for each of the following:
21 * + they reserialize to exactly what is given
22 * + if a mapping is provided, they compute to the same result as the mapping
30 var p = document.getElementById(
"display");
32 for (var test in tests) {
33 p.setAttribute(
"style",
"transform: rotate(" + test +
")");
34 is(p.style.getPropertyValue(
"transform"),
"rotate(" + test +
")",
35 test +
" serializes to exactly itself");
36 // We can't test any equivalence since we don't have any properties
37 // with angle values that we compute. (transform doesn't help.)
39 var equiv = tests[test];
41 var cm1 = getComputedStyle(p,
"").elevation;
42 p.style.elevation = equiv;
43 var cm2 = getComputedStyle(p,
"").elevation;
44 is(cm1, cm2, test +
" should compute to the same as " + equiv);