Unprefix -webkit-font-feature-settings
[WebKit-https.git] / LayoutTests / css3 / font-weight.html
1 <html>
2 <head>
3 <style>
4 #bolder { font-weight: bolder; }
5 #lighter { font-weight: lighter; }
6 </style>
7 <script src="../resources/js-test-pre.js"></script>
8 </head>
9 <body>
10 <div id="outer">
11     <div id="bolder"></div>
12     <div id="lighter"></div>
13 </div>
14 <div id="console"></div>
15 <script>
16 description('Test that font-weight: bolder and font-weight: lighter behave according to spec.');
17
18 table = [
19 ["100"   , "100"   , "normal", "100"],
20 ["200"   , "200"   , "normal", "100"],
21 ["300"   , "300"   , "normal", "100"],
22 ["400"   , "normal", "bold"  , "100"],
23 ["normal", "normal", "bold"  , "100"],
24 ["500"   , "500"   , "bold"  , "100"],
25 ["600"   , "600"   , "900"   , "normal"],
26 ["700"   , "bold"  , "900"   , "normal"],
27 ["bold"  , "bold"  , "900"   , "normal"],
28 ["800"   , "800"   , "900"   , "bold"],
29 ["900"   , "900"   , "900"   , "bold"],
30 ];
31
32 var outer = document.getElementById("outer");
33 var bolder = document.getElementById("bolder");
34 var lighter = document.getElementById("lighter");
35 for(var i=0; i<table.length; i++) {
36     outer.style.fontWeight = table[i][0];
37     shouldBeEqualToString('getComputedStyle(outer).fontWeight', table[i][1]);
38     shouldBeEqualToString('getComputedStyle(bolder).fontWeight', table[i][2]);
39     shouldBeEqualToString('getComputedStyle(lighter).fontWeight', table[i][3]);
40 }
41 </script>
42 <script src="../resources/js-test-post.js"></script>
43 </body>
44 </html>