Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / first-letter-removed-added.html
bloba9a273bf1c4254cc523574810fe3e0595a220874
1 <!doctype html>
2 <html>
3 <head>
4 <title>Test for first-letter that is removed or added by style change</title>
5 <style>
6 .test:first-letter { color: green; font-size:64px; float:inherit; }
7 .test { clear:both; }
8 .boxed { border: solid 1px; }
9 .bef:before { content:"Before "; }
10 </style>
11 <script src="../../resources/js-test.js"></script>
12 </head>
13 <body>
14 <div id="description"></div>
16 Test 1:<br/>
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/>
19 <hr/>
21 Test 2:<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>
24 <hr/>
26 Test 3:<br/>
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>
29 <hr/>
31 Test 4:<br/>
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>
34 <hr/>
36 Test 5:<br/>
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>
39 <br/>
40 <hr/>
42 Test 6:<br/>
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>
45 <hr/>
47 Test 7:<br/>
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>
50 <br/>
51 <hr/>
53 Test 8:<br/>
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>
56 <hr/>
58 <div id="console"></div>
60 <script>
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");
82 </script>
83 </body>
84 </html>