| <!DOCTYPE html> |
| <html> |
| <head> |
| |
| <meta name="viewport" content="width=800"> |
| <style> |
| body, html { |
| overflow: hidden; |
| } |
| html { |
| font-size: small; |
| } |
| .inline { |
| display: inline; |
| font-weight: normal; |
| font-style: normal; |
| background-color: green; |
| } |
| i.inline { |
| background-color: blue; |
| } |
| b { |
| font-weight: normal; |
| font-style: normal; |
| background-color: purple; |
| } |
| </style> |
| |
| <script src="resources/autosizingTest.js"></script> |
| </head> |
| <body> |
| This test passes if all lines have the same width.<br/> |
| <div class="inline"> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| |
| <i class="inline">AutosizeAutosizeAutosizeAutosize</i><br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| <b><b><b><i class="inline"><b><b><b>AutosizeAutosizeAutosizeAutosize</b></b></b></i></b></b></b><br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize<br/> |
| AutosizeAutosizeAutosizeAutosize |
| </div> |
| |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| var pass = true; |
| var inlines = document.getElementsByClassName('inline'); |
| var referenceWidth = inlines[0].offsetWidth; |
| for (var i = 1; i < inlines.length; i++) { |
| if (inlines[i].offsetWidth != referenceWidth) |
| pass = false; |
| } |
| if (pass) |
| document.body.innerText = 'PASS: All inlines have the same width.'; |
| else |
| document.body.innerText = 'FAIL: All inlines do not have the same width.'; |
| </script> |
| </body> |
| </html> |