Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / style / test / file_specified_value_serialization_individual_transforms.html
blob9dcf85f955992371ed73c01711f1552da9ceb7fe
1 <!doctype html>
2 <meta charset=utf-8>
3 <title>Test for Bug 1207734 (individual transforms)</title>
4 <!--
5 FIXME: This is only here in a separate file since it needs the
6 layout.css.individual-transform.enabled pref to be set when it runs and the
7 pref= annotation in mochitest.ini doesn't work on Android (bug 1393326).
8 Once we turn on that pref by default or fix bug 1393326 we can move this back
9 into test_specified_value_serialization.html.
10 -->
11 <script>
12 const is = opener.is.bind(opener);
13 function finish() {
14 const o = opener;
15 self.close();
16 o.SimpleTest.finish();
19 function runTest() {
20 // Test for rotate property serialization.
22 [" 90deg ", "90deg"],
23 [" 100grad ", "100grad"],
24 [" 100gRaD ", "100grad"],
25 [" 0.25turn ", "0.25turn"],
26 [" 0.25tUrN ", "0.25turn"],
27 [" 1.57RaD ", "1.57rad"],
28 ].forEach(function(arr) {
29 document.documentElement.style.rotate = arr[0];
30 is(document.documentElement.style.rotate, arr[1],
31 "bug-1207734: incorrect rotate serialization");
32 });
33 document.documentElement.style.rotate = "";
35 // Test for translate property serialization.
37 [" 50% 5px 6px ", "50% 5px 6px"],
38 [" 50% 10px 100px ", "50% 10px 100px"],
39 [" 4px 5px ", "4px 5px"],
40 [" 10% 10% 99px ", "10% 10% 99px"],
41 [" 50px ", "50px"],
42 ].forEach(function(arr) {
43 document.documentElement.style.translate = arr[0];
44 is(document.documentElement.style.translate, arr[1],
45 "bug-1207734: incorrect translate serialization");
46 });
47 document.documentElement.style.translate = "";
49 // Test for scale property serialization.
51 [" 10 ", "10"],
52 [" 10 20.5 ", "10 20.5"],
53 [" 10 20 30 ", "10 20 30"],
54 ].forEach(function(arr) {
55 document.documentElement.style.scale = arr[0];
56 is(document.documentElement.style.scale, arr[1],
57 "bug-1207734: incorrect scale serialization");
58 });
60 document.documentElement.style.scale = "";
63 runTest();
64 finish();
65 </script>