Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: LayoutTests/fast/multicol/break-properties.html

Issue 764503002: Make fast/multicol/break-properties independent of the size of <body>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Count from zero, padding:8px, remove <body>. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/multicol/break-properties-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/multicol/break-properties.html
diff --git a/LayoutTests/fast/multicol/break-properties.html b/LayoutTests/fast/multicol/break-properties.html
index e1a32b37ac984777a5feda84a42a3849c2f88f91..6bc4207b193acb73eb8c5babfac3472160bc1807 100644
--- a/LayoutTests/fast/multicol/break-properties.html
+++ b/LayoutTests/fast/multicol/break-properties.html
@@ -1,9 +1,11 @@
+<!DOCTYPE html>
<style>
+ body { margin: 8px; }
div.box { -webkit-box-sizing: border; border: solid blue; }
div.shorter { height: 54px; }
div.taller { height: 72px; }
</style>
-<div style="height: 100px; width: 630; -webkit-columns:6; -webkit-column-gap:5px; columns:6; column-gap:5px;">
+<div style="height: 100px; width: 325px; -webkit-columns:6; -webkit-column-gap:5px; columns:6; column-gap:5px;">
<div class="taller box"></div>
<div class="taller box"></div>
<div id="break-before" class="shorter box" style="-webkit-column-break-before: always;"></div>
@@ -21,16 +23,18 @@
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.left);
+ var expectedPosition = 8 + (50 + 5) * expectedColumn;
+
+ 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", 220, 8);
- testBoxPosition("after-break", 431, 8);
- testBoxPosition("no-break", 537, 8);
+ testBoxColumn("break-before", 2);
+ testBoxColumn("after-break", 4);
+ testBoxColumn("no-break", 5);
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/multicol/break-properties-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698