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

Unified Diff: LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/supported-shapes/support/rounded-rectangle.js

Issue 816533002: Import CSSWG Shapes tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more test expectations update Created 6 years 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/imported/csswg-test/css-shapes-1/shape-outside/supported-shapes/support/rounded-rectangle.js
diff --git a/LayoutTests/fast/shapes/resources/rounded-rectangle.js b/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/supported-shapes/support/rounded-rectangle.js
similarity index 85%
copy from LayoutTests/fast/shapes/resources/rounded-rectangle.js
copy to LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/supported-shapes/support/rounded-rectangle.js
index c9f4e9e947f420d7df7ab94761603ea6cc3eb52e..3e624322a43397e542444819f7b4ecccd939bd02 100644
--- a/LayoutTests/fast/shapes/resources/rounded-rectangle.js
+++ b/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/supported-shapes/support/rounded-rectangle.js
@@ -35,12 +35,6 @@ function scanConvertRoundedRectangleOutside(r, height, lineHeight, corner)
return intervals;
}
-function genLeftRightRoundedRectFloatShapeOutsideRefTest(args)
-{
- genLeftRoundedRectFloatShapeOutsideRefTest(args);
- genRightRoundedRectFloatShapeOutsideRefTest(args);
-}
-
function genLeftRoundedRectFloatShapeOutsideRefTest(args)
{
var leftRoundedRect = args.roundedRect;
@@ -51,6 +45,18 @@ function genLeftRoundedRectFloatShapeOutsideRefTest(args)
return '<div class="' + cls + '" style="width:' + width + 'px"></div>';
});
document.getElementById("left-" + args.insertElementIdSuffix).insertAdjacentHTML('afterend', leftFloatDivs.join("\n"));
+ return leftFloatDivs;
+}
+
+function getRoundedRectLeftEdge(args)
+{
+ var leftRoundedRect = args.roundedRect;
+ var leftRoundedRectIntervals = scanConvertRoundedRectangleOutside(leftRoundedRect, args.containerHeight, args.lineHeight, args.corner);
+ var leftSidePoints = leftRoundedRectIntervals.map(function(interval) {
+ var width = SubPixelLayout.snapToLayoutUnit(interval.right);
+ return width;
+ });
+ return leftSidePoints;
}
function genRightRoundedRectFloatShapeOutsideRefTest(args)
@@ -64,4 +70,4 @@ function genRightRoundedRectFloatShapeOutsideRefTest(args)
return '<div class="' + cls + '" style="width:' + width + 'px"></div>';
});
document.getElementById("right-" + args.insertElementIdSuffix).insertAdjacentHTML('afterend', rightFloatDivs.join("\n"));
-}
+}

Powered by Google App Engine
This is Rietveld 408576698