blob: 0a6d77033fd3b19b63b9cbac4aec9d5368a576ec [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<style id="weightTest">
@font-face {
font-weight: 1;
}
@font-face {
font-weight: 100;
}
@font-face {
font-weight: 200;
}
@font-face {
font-weight: 300;
}
@font-face {
font-weight: 400;
}
@font-face {
font-weight: normal;
}
@font-face {
font-weight: 500;
}
@font-face {
font-weight: 600;
}
@font-face {
font-weight: 700;
}
@font-face {
font-weight: bold;
}
@font-face {
font-weight: 800;
}
@font-face {
font-weight: 900;
}
@font-face {
font-weight: garbage;
}
@font-face {
font-weight: initial;
}
@font-face {
}
@font-face {
font-weight: calc(3 + 4);
}
@font-face {
font-weight: calc(100 + 200);
}
@font-face {
font-weight: calc(150 + 50);
}
@font-face {
font-weight: 100 200;
}
@font-face {
font-weight: 100 200;
}
@font-face {
font-weight: a 100 200;
}
@font-face {
font-weight: 100 200 a;
}
@font-face {
font-weight: 100 a 200;
}
@font-face {
font-weight: 100a 200;
}
@font-face {
font-weight: 100 a200;
}
@font-face {
font-weight: 100 a200;
}
@font-face {
font-weight: 1 2;
}
@font-face {
font-weight: -2 -1;
}
@font-face {
font-weight: 2 1;
}
@font-face {
font-weight: calc(3 + 4) 8;
}
@font-face {
font-weight: 2 calc(3 + 4);
}
</style>
<style id="stretchTest">
@font-face {
font-stretch: 1%;
}
@font-face {
font-stretch: 2;
}
@font-face {
font-stretch: ultra-condensed;
}
@font-face {
font-stretch: extra-condensed;
}
@font-face {
font-stretch: condensed;
}
@font-face {
font-stretch: semi-condensed;
}
@font-face {
font-stretch: normal;
}
@font-face {
font-stretch: semi-expanded;
}
@font-face {
font-stretch: expanded;
}
@font-face {
font-stretch: extra-expanded;
}
@font-face {
font-stretch: ultra-expanded;
}
@font-face {
font-stretch: garbage;
}
@font-face {
font-stretch: initial;
}
@font-face {
font-stretch: calc(3 + 4);
}
@font-face {
font-stretch: 100 200;
}
@font-face {
font-stretch: 100 200;
}
@font-face {
font-stretch: a 100 200;
}
@font-face {
font-stretch: 100 200 a;
}
@font-face {
font-stretch: 100 a 200;
}
@font-face {
font-stretch: 100a 200;
}
@font-face {
font-stretch: 100 a200;
}
@font-face {
font-stretch: 100 a200;
}
@font-face {
font-stretch: 1 2;
}
@font-face {
font-stretch: -2 -1;
}
@font-face {
font-stretch: 2 1;
}
@font-face {
font-stretch: 100% 200%;
}
@font-face {
font-stretch: 100% 200%;
}
@font-face {
font-stretch: a 100% 200%;
}
@font-face {
font-stretch: 100% 200% a;
}
@font-face {
font-stretch: 100% a 200%;
}
@font-face {
font-stretch: 100%a 200%;
}
@font-face {
font-stretch: 100% a200%;
}
@font-face {
font-stretch: 100% a200%;
}
@font-face {
font-stretch: 1% 2%;
}
@font-face {
font-stretch: -2% -1%;
}
@font-face {
font-stretch: 2% 1%;
}
@font-face {
font-stretch: 1 2%;
}
@font-face {
font-stretch: 1% 2;
}
@font-face {
font-stretch: calc(3 + 4) 8;
}
@font-face {
font-stretch: 2 calc(3 + 4);
}
@font-face {
font-stretch: calc(3% + 4%) 8%;
}
@font-face {
font-stretch: 2% calc(3% + 4%);
}
</style>
<style id="styleTest">
@font-face {
font-style: oblique 1deg;
}
@font-face {
font-style: oblique 20grad;
}
@font-face {
font-style: oblique 0.28318rad;
}
@font-face {
font-style: oblique 0.04turn;
}
@font-face {
font-style: oblique 5;
}
@font-face {
font-style: oblique 20;
}
@font-face {
font-style: italic;
}
@font-face {
font-style: oblique;
}
@font-face {
font-style: normal;
}
@font-face {
font-style: garbage;
}
@font-face {
font-style: initial;
}
@font-face {
font-style: oblique calc(3 + 4);
}
@font-face {
font-style: oblique calc(0.04turn + 1deg);
}
@font-face {
font-style: oblique 10 20;
}
@font-face {
font-style: oblique 10 20;
}
@font-face {
font-style: oblique a 10 20;
}
@font-face {
font-style: oblique 10 20 a;
}
@font-face {
font-style: oblique 10 a 20;
}
@font-face {
font-style: oblique 10 a20;
}
@font-face {
font-style: oblique 10a 20;
}
@font-face {
font-style: oblique 10 a20;
}
@font-face {
font-style: oblique 1 2;
}
@font-face {
font-style: oblique -2 -1;
}
@font-face {
font-style: oblique 2 1;
}
@font-face {
font-style: oblique 10deg 20deg;
}
@font-face {
font-style: oblique 10deg 20deg;
}
@font-face {
font-style: oblique a 10deg 20deg;
}
@font-face {
font-style: oblique 10deg 20deg a;
}
@font-face {
font-style: oblique 10deg a 20deg;
}
@font-face {
font-style: oblique 10deg a20deg;
}
@font-face {
font-style: oblique 10dega 20deg;
}
@font-face {
font-style: oblique 10deg a20deg;
}
@font-face {
font-style: oblique 1deg 2deg;
}
@font-face {
font-style: oblique -2deg -1deg;
}
@font-face {
font-style: oblique 2deg 1deg;
}
@font-face {
font-style: oblique 1 2deg;
}
@font-face {
font-style: oblique 1deg 2;
}
@font-face {
font-style: oblique 2deg 4grad;
}
@font-face {
font-style: oblique calc(3 + 4) 8;
}
@font-face {
font-style: oblique 2 calc(3 + 4);
}
@font-face {
font-style: oblique calc(3deg + 4deg) 8deg;
}
@font-face {
font-style: oblique 2deg calc(3deg + 4deg);
}
</style>
</head>
<body>
<script>
var weightTestSheet = document.getElementById("weightTest").sheet;
shouldBeEqualToString("weightTestSheet.cssRules[0].style.fontWeight", "1");
shouldBeEqualToString("weightTestSheet.cssRules[1].style.fontWeight", "100");
shouldBeEqualToString("weightTestSheet.cssRules[2].style.fontWeight", "200");
shouldBeEqualToString("weightTestSheet.cssRules[3].style.fontWeight", "300");
shouldBeEqualToString("weightTestSheet.cssRules[4].style.fontWeight", "400");
shouldBeEqualToString("weightTestSheet.cssRules[5].style.fontWeight", "normal");
shouldBeEqualToString("weightTestSheet.cssRules[6].style.fontWeight", "500");
shouldBeEqualToString("weightTestSheet.cssRules[7].style.fontWeight", "600");
shouldBeEqualToString("weightTestSheet.cssRules[8].style.fontWeight", "700");
shouldBeEqualToString("weightTestSheet.cssRules[9].style.fontWeight", "bold");
shouldBeEqualToString("weightTestSheet.cssRules[10].style.fontWeight", "800");
shouldBeEqualToString("weightTestSheet.cssRules[11].style.fontWeight", "900");
shouldBeEqualToString("weightTestSheet.cssRules[12].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[13].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[14].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[15].style.fontWeight", "7");
shouldBeEqualToString("weightTestSheet.cssRules[16].style.fontWeight", "300");
shouldBeEqualToString("weightTestSheet.cssRules[17].style.fontWeight", "200");
shouldBeEqualToString("weightTestSheet.cssRules[18].style.fontWeight", "100 200");
shouldBeEqualToString("weightTestSheet.cssRules[19].style.fontWeight", "100 200");
shouldBeEqualToString("weightTestSheet.cssRules[20].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[21].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[22].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[23].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[24].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[25].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[26].style.fontWeight", "1 2");
shouldBeEqualToString("weightTestSheet.cssRules[27].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[28].style.fontWeight", "");
shouldBeEqualToString("weightTestSheet.cssRules[29].style.fontWeight", "7 8");
shouldBeEqualToString("weightTestSheet.cssRules[30].style.fontWeight", "2 7");
var stretchTestSheet = document.getElementById("stretchTest").sheet;
shouldBeEqualToString("stretchTestSheet.cssRules[0].style.fontStretch", "1%");
shouldBeEqualToString("stretchTestSheet.cssRules[1].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[2].style.fontStretch", "ultra-condensed");
shouldBeEqualToString("stretchTestSheet.cssRules[3].style.fontStretch", "extra-condensed");
shouldBeEqualToString("stretchTestSheet.cssRules[4].style.fontStretch", "condensed");
shouldBeEqualToString("stretchTestSheet.cssRules[5].style.fontStretch", "semi-condensed");
shouldBeEqualToString("stretchTestSheet.cssRules[6].style.fontStretch", "normal");
shouldBeEqualToString("stretchTestSheet.cssRules[7].style.fontStretch", "semi-expanded");
shouldBeEqualToString("stretchTestSheet.cssRules[8].style.fontStretch", "expanded");
shouldBeEqualToString("stretchTestSheet.cssRules[9].style.fontStretch", "extra-expanded");
shouldBeEqualToString("stretchTestSheet.cssRules[10].style.fontStretch", "ultra-expanded");
shouldBeEqualToString("stretchTestSheet.cssRules[11].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[12].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[13].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[14].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[15].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[16].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[17].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[18].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[19].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[20].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[21].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[22].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[23].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[24].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[25].style.fontStretch", "100% 200%");
shouldBeEqualToString("stretchTestSheet.cssRules[26].style.fontStretch", "100% 200%");
shouldBeEqualToString("stretchTestSheet.cssRules[27].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[28].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[29].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[30].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[31].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[32].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[33].style.fontStretch", "1% 2%");
shouldBeEqualToString("stretchTestSheet.cssRules[34].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[35].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[36].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[37].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[38].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[39].style.fontStretch", "");
shouldBeEqualToString("stretchTestSheet.cssRules[40].style.fontStretch", "calc(7%) 8%");
shouldBeEqualToString("stretchTestSheet.cssRules[41].style.fontStretch", "2% calc(7%)");
var styleTestSheet = document.getElementById("styleTest").sheet;
shouldBeEqualToString("styleTestSheet.cssRules[0].style.fontStyle", "oblique 1deg");
shouldBeEqualToString("styleTestSheet.cssRules[1].style.fontStyle", "oblique 20grad");
shouldBeEqualToString("styleTestSheet.cssRules[2].style.fontStyle", "oblique 0.28318rad");
shouldBeEqualToString("styleTestSheet.cssRules[3].style.fontStyle", "oblique 0.04turn");
shouldBeEqualToString("styleTestSheet.cssRules[4].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[5].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[6].style.fontStyle", "italic");
shouldBeEqualToString("styleTestSheet.cssRules[7].style.fontStyle", "oblique");
shouldBeEqualToString("styleTestSheet.cssRules[8].style.fontStyle", "normal");
shouldBeEqualToString("styleTestSheet.cssRules[9].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[10].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[11].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[12].style.fontStyle", "oblique calc(15.4deg)");
shouldBeEqualToString("styleTestSheet.cssRules[13].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[14].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[15].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[16].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[17].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[18].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[19].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[20].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[21].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[22].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[23].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[24].style.fontStyle", "oblique 10deg 20deg");
shouldBeEqualToString("styleTestSheet.cssRules[25].style.fontStyle", "oblique 10deg 20deg");
shouldBeEqualToString("styleTestSheet.cssRules[26].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[27].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[28].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[29].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[30].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[31].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[32].style.fontStyle", "oblique 1deg 2deg");
shouldBeEqualToString("styleTestSheet.cssRules[33].style.fontStyle", "oblique -2deg -1deg");
shouldBeEqualToString("styleTestSheet.cssRules[34].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[35].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[36].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[37].style.fontStyle", "oblique 2deg 4grad");
shouldBeEqualToString("styleTestSheet.cssRules[38].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[39].style.fontStyle", "");
shouldBeEqualToString("styleTestSheet.cssRules[40].style.fontStyle", "oblique calc(7deg) 8deg");
shouldBeEqualToString("styleTestSheet.cssRules[41].style.fontStyle", "oblique 2deg calc(7deg)");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>