4 #bolder { font-weight: bolder; }
5 #lighter { font-weight: lighter; }
7 <script src=
"../resources/js-test.js"></script>
11 <div id=
"bolder"></div>
12 <div id=
"lighter"></div>
14 <div id=
"console"></div>
16 description('Test that font-weight: bolder and font-weight: lighter behave according to spec.');
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"],
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]);