Chromium Code Reviews| Index: LayoutTests/fast/multicol/vertical-lr/break-properties.html |
| diff --git a/LayoutTests/fast/multicol/vertical-lr/break-properties.html b/LayoutTests/fast/multicol/vertical-lr/break-properties.html |
| index e8e844535a4088b907bb30d6dc659e0c097ad4fc..9b77d41173e6cd2f3a1e14934dcdeaa3a5a45ca5 100644 |
| --- a/LayoutTests/fast/multicol/vertical-lr/break-properties.html |
| +++ b/LayoutTests/fast/multicol/vertical-lr/break-properties.html |
| @@ -1,10 +1,12 @@ |
| +<!DOCTYPE html> |
| <style> |
| + body { margin: 5px; } |
|
mstensho (USE GERRIT)
2014/11/27 10:37:54
Either remove this selector and move the declarati
andersr
2014/11/27 11:03:03
Done. Removed the tags.
|
| div.box { -webkit-box-sizing: border; border: solid blue; } |
| div.shorter { width: 54px; } |
| div.taller { width: 72px; } |
| </style> |
| <body style="-webkit-writing-mode:vertical-lr"> |
| -<div style="width:100px; height:630px; -webkit-columns:6; -webkit-column-gap:5px; columns:6; column-gap:5px; column-fill:auto;"> |
| +<div style="width:100px; height:325px; -webkit-columns:6; -webkit-column-gap:5px; columns:6; column-gap:5px; column-fill:auto;"> |
| <div class="taller box"></div> |
| <div class="taller box"></div> |
| <div id="break-before" class="shorter box" style="-webkit-column-break-before: always;"></div> |
| @@ -22,15 +24,19 @@ |
| document.getElementById("console").appendChild(document.createTextNode(message + "\n")); |
| } |
| - function testBoxPosition(id, expectedLeft, expectedTop) |
| - { |
| + function testBoxColumn(id, expectedColumn) { |
| var rect = document.getElementById(id).getBoundingClientRect(); |
| - if (Math.round(rect.left) === expectedLeft && Math.round(rect.top) === expectedTop) |
| - log("PASS: '" + id + "' is at (" + expectedLeft + ", " + expectedTop + ")"); |
| + var actualPosition = Math.round(rect.top); |
| + var expectedPosition = (expectedColumn - 1) * 50 + expectedColumn * 5; |
| + |
| + if (actualPosition == expectedPosition) |
| + log("PASS: '" + id + "' is in column " + expectedColumn); |
| else |
| - log("FAIL: '" + id + "' is at (" + Math.round(rect.left) + ", " + Math.round(rect.top) + ") instead of (" + expectedLeft + " ," + expectedTop + ")"); |
| + log("FAIL: '" + id + "' is at position " + actualPosition + " instead of " + expectedPosition); |
| } |
| - testBoxPosition("break-before", 8, 220); |
| - testBoxPosition("after-break", 8, 431); |
| + testBoxColumn("break-before", 3); |
| + testBoxColumn("after-break", 5); |
| + testBoxColumn("no-break", 6); |
| </script> |
| +</body> |