blob: 47b1ec0324e7a68f6dc5ceee9e47740e275bf464 [file] [log] [blame]
This test checks that the min-width style is applied to block HTML tables.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
======== General notes ========
The stylesheet used to style the table in each test is available at: LayoutTests/fast/table/resources/min-width.css
Most importantly, note that each table has:
- minimum intrinsic width and height both equal to 100px based on the table content
- maximum intrinsic width and height both equal to 250px based on the table content
- borders and paddings that add up to 30px in both the horizontal and vertical directions
- a parent whose dimensions are 1000px by 1000px
The function signature of computeLogicalWidth is:
function computeLogicalWidth(writingMode, direction, tableStyle)
======== Test horizontal writing mode ========
==== Test ltr direction ====
PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 500px;') is '470px'
PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 150px;') is '250px'
PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 50px;') is '250px'
PASS computeLogicalWidth('horizontal', 'ltr', 'width: 600px; min-width: 500px;') is '570px'
PASS computeLogicalWidth('horizontal', 'ltr', 'width: 400px; min-width: 500px;') is '470px'
PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 500px;') is '570px'
PASS computeLogicalWidth('horizontal', 'ltr', 'width: 40%; min-width: 500px;') is '470px'
PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 50%;') is '470px'
PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 15%;') is '250px'
PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 5%;') is '250px'
PASS computeLogicalWidth('horizontal', 'ltr', 'width: 600px; min-width: 50%;') is '570px'
PASS computeLogicalWidth('horizontal', 'ltr', 'width: 400px; min-width: 50%;') is '470px'
PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 50%;') is '570px'
PASS computeLogicalWidth('horizontal', 'ltr', 'width: 40%; min-width: 50%;') is '470px'
PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: auto;') is '250px'
==== Test rtl direction ====
PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 500px;') is '470px'
PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 150px;') is '250px'
PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 50px;') is '250px'
PASS computeLogicalWidth('horizontal', 'rtl', 'width: 600px; min-width: 500px;') is '570px'
PASS computeLogicalWidth('horizontal', 'rtl', 'width: 400px; min-width: 500px;') is '470px'
PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 500px;') is '570px'
PASS computeLogicalWidth('horizontal', 'rtl', 'width: 40%; min-width: 500px;') is '470px'
PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 50%;') is '470px'
PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 15%;') is '250px'
PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 5%;') is '250px'
PASS computeLogicalWidth('horizontal', 'rtl', 'width: 600px; min-width: 50%;') is '570px'
PASS computeLogicalWidth('horizontal', 'rtl', 'width: 400px; min-width: 50%;') is '470px'
PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 50%;') is '570px'
PASS computeLogicalWidth('horizontal', 'rtl', 'width: 40%; min-width: 50%;') is '470px'
PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: auto;') is '250px'
======== Test vertical writing mode ========
==== Test ltr direction ====
PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 500px;') is '470px'
PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 150px;') is '250px'
PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 50px;') is '250px'
PASS computeLogicalWidth('vertical', 'ltr', 'height: 600px; min-height: 500px;') is '570px'
PASS computeLogicalWidth('vertical', 'ltr', 'height: 400px; min-height: 500px;') is '470px'
PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 500px;') is '570px'
PASS computeLogicalWidth('vertical', 'ltr', 'height: 40%; min-height: 500px;') is '470px'
PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 50%;') is '470px'
PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 15%;') is '250px'
PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 5%;') is '250px'
PASS computeLogicalWidth('vertical', 'ltr', 'height: 600px; min-height: 50%;') is '570px'
PASS computeLogicalWidth('vertical', 'ltr', 'height: 400px; min-height: 50%;') is '470px'
PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 50%;') is '570px'
PASS computeLogicalWidth('vertical', 'ltr', 'height: 40%; min-height: 50%;') is '470px'
PASS computeLogicalWidth('vertical', 'ltr', 'min-height: auto;') is '250px'
==== Test rtl direction ====
PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 500px;') is '470px'
PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 150px;') is '250px'
PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 50px;') is '250px'
PASS computeLogicalWidth('vertical', 'rtl', 'height: 600px; min-height: 500px;') is '570px'
PASS computeLogicalWidth('vertical', 'rtl', 'height: 400px; min-height: 500px;') is '470px'
PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 500px;') is '570px'
PASS computeLogicalWidth('vertical', 'rtl', 'height: 40%; min-height: 500px;') is '470px'
PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 50%;') is '470px'
PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 15%;') is '250px'
PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 5%;') is '250px'
PASS computeLogicalWidth('vertical', 'rtl', 'height: 600px; min-height: 50%;') is '570px'
PASS computeLogicalWidth('vertical', 'rtl', 'height: 400px; min-height: 50%;') is '470px'
PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 50%;') is '570px'
PASS computeLogicalWidth('vertical', 'rtl', 'height: 40%; min-height: 50%;') is '470px'
PASS computeLogicalWidth('vertical', 'rtl', 'min-height: auto;') is '250px'
PASS successfullyParsed is true
TEST COMPLETE