Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text-autosizing / table-inline-width.html
blob21411e9274d404c415069c7f5f4db38502a651cf
1 <!DOCTYPE html>
2 <html>
3 <head>
5 <meta name="viewport" content="width=800">
6 <style>
7 body, html {
8 overflow: hidden;
10 html {
11 font-size: small;
13 .inline {
14 display: inline;
15 font-weight: normal;
16 font-style: normal;
17 background-color: green;
19 i.inline {
20 background-color: blue;
22 b {
23 font-weight: normal;
24 font-style: normal;
25 background-color: purple;
27 </style>
29 <script src="resources/autosizingTest.js"></script>
30 </head>
31 <body>
32 This test passes if all lines have the same width.<br/>
33 <table>
34 <tr>
35 <td>a</td>
36 <td>
37 <div class="inline">
38 AutosizeAutosizeAutosizeAutosize<br/>
39 AutosizeAutosizeAutosizeAutosize<br/>
40 AutosizeAutosizeAutosizeAutosize<br/>
41 AutosizeAutosizeAutosizeAutosize<br/>
42 </div>
43 <i class="inline">AutosizeAutosizeAutosizeAutosize</i><br/>
44 AutosizeAutosizeAutosizeAutosize<br/>
45 AutosizeAutosizeAutosizeAutosize<br/>
46 AutosizeAutosizeAutosizeAutosize<br/>
47 <b><b><b><i class="inline"><b><b><b>AutosizeAutosizeAutosizeAutosize</b></b></b></i></b></b></b><br/>
48 AutosizeAutosizeAutosizeAutosize<br/>
49 AutosizeAutosizeAutosizeAutosize<br/>
50 AutosizeAutosizeAutosizeAutosize<br/>
51 AutosizeAutosizeAutosizeAutosize<br/>
52 AutosizeAutosizeAutosizeAutosize<br/>
53 AutosizeAutosizeAutosizeAutosize<br/>
54 AutosizeAutosizeAutosizeAutosize<br/>
55 AutosizeAutosizeAutosizeAutosize<br/>
56 AutosizeAutosizeAutosizeAutosize
57 </td>
58 </tr>
59 </table>
61 <script>
62 if (window.testRunner)
63 testRunner.dumpAsText();
64 var pass = true;
65 var inlines = document.getElementsByClassName('inline');
66 var referenceWidth = inlines[0].offsetWidth;
67 for (var i = 1; i < inlines.length; i++) {
68 if (inlines[i].offsetWidth != referenceWidth)
69 pass = false;
71 if (pass)
72 document.body.innerText = 'PASS: All inlines have the same width.';
73 else
74 document.body.innerText = 'FAIL: All inlines do not have the same width.';
75 </script>
76 </body>
77 </html>