1 <pre id=
"console"></pre>
4 testRunner
.dumpAsText();
8 document
.getElementById("console").appendChild(document
.createTextNode(message
+ "\n"));
11 function test(value
, expectedCSSText
, expectedComputedCSSText
)
13 var element
= document
.createElement("div");
14 element
.style
.setProperty("font-variant-ligatures", value
);
15 var cssText
= element
.style
.fontVariantLigatures
;
16 document
.body
.appendChild(element
);
17 var computedCSSText
= getComputedStyle(element
).fontVariantLigatures
;
18 document
.body
.removeChild(element
);
19 if (cssText
=== expectedCSSText
&& computedCSSText
== expectedComputedCSSText
)
20 log("PASS: '" + value
+ "' parsed as '" + expectedCSSText
+ "' and computed to '" + computedCSSText
+ "'");
22 if (cssText
!== expectedCSSText
)
23 log("FAIL: '" + value
+ "' parsed as '" + cssText
+ "' rather than '" + expectedCSSText
+ "'");
24 if (computedCSSText
!== expectedComputedCSSText
)
25 log("FAIL: '" + value
+ "' computed to '" + computedCSSText
+ "' rather than '" + expectedComputedCSSText
+ "'");
29 test('initial', 'initial', 'normal');
30 test('inherit', 'inherit', 'normal');
31 test('normal', 'normal', 'normal');
32 test('large', '', 'normal');
33 test('25px', '', 'normal');
34 test('normal normal', '', 'normal');
35 test('normal no-common-ligatures', '', 'normal');
38 test('no-common-ligatures', 'no-common-ligatures', 'no-common-ligatures');
39 test('common-ligatures', 'common-ligatures', 'common-ligatures');
40 test('no-discretionary-ligatures', 'no-discretionary-ligatures', 'no-discretionary-ligatures');
41 test('discretionary-ligatures', 'discretionary-ligatures', 'discretionary-ligatures');
42 test('no-historical-ligatures', 'no-historical-ligatures', 'no-historical-ligatures');
43 test('historical-ligatures', 'historical-ligatures', 'historical-ligatures');
46 test('no-common-ligatures no-common-ligatures', '', 'normal');
47 test('common-ligatures no-discretionary-ligatures', 'common-ligatures no-discretionary-ligatures', 'common-ligatures no-discretionary-ligatures');
48 test('common-ligatures no-discretionary-ligatures historical-ligatures', 'common-ligatures no-discretionary-ligatures historical-ligatures', 'common-ligatures no-discretionary-ligatures historical-ligatures');
49 test('common-ligatures no-discretionary-ligatures normal', '', 'normal');