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

Unified Diff: LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html

Issue 14959014: [CSS Exclusions] Programmatic layout tests fail when subpixel layout is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated per review feedback. Created 7 years, 7 months 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
Index: LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html
diff --git a/LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html b/LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html
index 7fcb7a692fb39f91d141a4bc16d674e21cf167a5..ff2115fe758ac69352c169f9c6e9e940fe9a4e4d 100644
--- a/LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html
+++ b/LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html
@@ -52,6 +52,7 @@
<span id="s1">X</span></br><span id="s2">X</span><br/><span id="s3">X</span>
</div>
</div>
+<div id="console"></div>
</body>
<script>
function elementRect(elementId)
@@ -66,22 +67,23 @@ function elementRect(elementId)
function marginEllipseLeftXIntercept(y, cx, rx, ry)
{
- return String( SubPixelLayout.roundLineLeft(cx + rx * Math.sqrt(1 - Math.pow((ry - y) / ry, 2))) );
+ var f = SubPixelLayout.snapToLayoutUnit(cx + rx * Math.sqrt(1 - Math.pow((ry - y) / ry, 2)));
+ return String( Math.round(f) );
}
// In the ".left" tests below, it's the lower edge of the 20px Ahem glyph that that defines the element rect's left edge.
// That's why the Y coordinate in each of those tests is 20 greater than the ".top" test.
-SubPixelLayout.initSubPixelLayout();
+var quiet = true; // PASS output depends on SubPixelLayout.isEnabled()
shouldBe("elementRect('s1').top", "0");
-shouldBe("elementRect('s1').left", marginEllipseLeftXIntercept(20, 225, 225, 125));
+shouldBe("elementRect('s1').left", marginEllipseLeftXIntercept(20, 225, 225, 125), quiet);
shouldBe("elementRect('s2').top", "20");
-shouldBe("elementRect('s2').left", marginEllipseLeftXIntercept(40, 225, 225, 125));
+shouldBe("elementRect('s2').left", marginEllipseLeftXIntercept(40, 225, 225, 125), quiet);
shouldBe("elementRect('s3').top", "40");
-shouldBe("elementRect('s3').left", marginEllipseLeftXIntercept(60, 225, 225, 125));
+shouldBe("elementRect('s3').left", marginEllipseLeftXIntercept(60, 225, 225, 125), quiet);
</script>
</html>

Powered by Google App Engine
This is Rietveld 408576698