4 <title>Test for first-letter that is removed or added by style change
</title>
6 .test:first-letter { color: green; font-size:
64px; float:inherit; }
8 .boxed { border: solid
1px; }
9 .bef:before { content:
"Before "; }
11 <script src=
"../../resources/js-test.js"></script>
14 <div id=
"description"></div>
17 <div class=
"test boxed" id=
"test1">Block to Inline
</div><br/>
18 <div class=
"test boxed" id=
"ref1" style=
"display:inline">Block to Inline
</div><br/>
22 <span class=
"test boxed" id=
"test2">Inline to Block
</span>
23 <span class=
"test boxed" id=
"ref2" style=
"display:block">Inline to Block
</span>
27 <div class=
"test"><span id=
"test3" class=
"boxed bef">pseudo
</span></div>
28 <div class=
"test"><span id=
"ref3" class=
"boxed">pseudo
</span></div>
32 <div class=
"test"><span id=
"test4" class=
"boxed">pseudo
</span></div>
33 <div class=
"test"><span id=
"ref4" class=
"boxed bef">pseudo
</span></div>
37 <div class=
"test"><span id=
"test5" class=
"boxed" style=
"float:none">To Float
</span></div>
38 <div class=
"test"><span id=
"ref5" class=
"boxed" style=
"float:left">To Float
</span></div>
43 <div class=
"test"><span id=
"test6" class=
"boxed" style=
"float:left">To Non Float
</span></div>
44 <div class=
"test"><span id=
"ref6" class=
"boxed" style=
"float:none">To Non Float
</span></div>
48 <div class=
"test"><div id=
"test7" class=
"boxed" style=
"float:none">To Float
</div></div>
49 <div class=
"test"><div id=
"ref7" class=
"boxed" style=
"float:left">To Float
</div></div>
54 <div class=
"test"><div id=
"test8" class=
"boxed" style=
"float:left">To Non Float
</div></div>
55 <div class=
"test"><div id=
"ref8" class=
"boxed" style=
"float:none">To Non Float
</div></div>
58 <div id=
"console"></div>
61 description("The following pairs should look the same.");
63 document
.body
.offsetTop
; // Force layout
65 document
.getElementById("test1").style
.display
= "inline";
66 document
.getElementById("test2").style
.display
= "block";
67 document
.getElementById("test3").className
= "boxed";
68 document
.getElementById("test4").className
= "boxed bef";
69 document
.getElementById("test5").style
.float = "left";
70 document
.getElementById("test6").style
.float = "none";
71 document
.getElementById("test7").style
.float = "left";
72 document
.getElementById("test8").style
.float = "none";
74 shouldBeTrue("document.getElementById('test1').offsetWidth == document.getElementById('ref1').offsetWidth");
75 shouldBeTrue("document.getElementById('test2').offsetHeight == document.getElementById('ref2').offsetHeight");
76 shouldBeTrue("document.getElementById('test3').offsetWidth == document.getElementById('ref3').offsetWidth");
77 shouldBeTrue("document.getElementById('test4').offsetWidth == document.getElementById('ref4').offsetWidth");
78 shouldBeTrue("document.getElementById('test5').offsetWidth == document.getElementById('ref5').offsetWidth");
79 shouldBeTrue("document.getElementById('test6').offsetWidth == document.getElementById('ref6').offsetWidth");
80 shouldBeTrue("document.getElementById('test7').offsetWidth == document.getElementById('ref7').offsetWidth");
81 shouldBeTrue("document.getElementById('test8').offsetWidth == document.getElementById('ref8').offsetWidth");