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

Unified Diff: LayoutTests/fast/shapes/resources/simple-rectangle.js

Issue 200633005: [CSS Shapes] Remove deprecated shapes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test expectations Created 6 years, 9 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/shapes/resources/simple-rectangle.js
diff --git a/LayoutTests/fast/shapes/resources/simple-rectangle.js b/LayoutTests/fast/shapes/resources/simple-rectangle.js
index ffd0563590fba29c9b878a07d62cdf47d86acbbb..79c706525f730798afba00967a5bdf7b70360d34 100644
--- a/LayoutTests/fast/shapes/resources/simple-rectangle.js
+++ b/LayoutTests/fast/shapes/resources/simple-rectangle.js
@@ -12,14 +12,23 @@ function createRectangleTest(elementId, stylesheetId, bounds, shapeBounds, units
var rules = [];
for (var i in bounds)
rules.push(i + ':' + bounds[i] + units);
- var rectangleBounds = [shapeBounds.x + units, shapeBounds.y + units, shapeBounds.width + units, shapeBounds.height + units];
- rules.push('shape-inside: rectangle(' + rectangleBounds.join(',') + ')');
+ var rectangleBounds = {
+ top: shapeBounds.x + units,
+ left: shapeBounds.y + units,
+ bottom: (shapeBounds.y + shapeBounds.height) + units,
+ right: (shapeBounds.x + shapeBounds.width) + units
+ };
+ rules.push('-webkit-shape-inside: polygon(' +
+ rectangleBounds.left + " " + rectangleBounds.top + "," +
+ rectangleBounds.right + " " + rectangleBounds.top + "," +
+ rectangleBounds.right + " " + rectangleBounds.bottom + "," +
+ rectangleBounds.left + " " + rectangleBounds.bottom + ')');
rules.push('position: relative');
rules.push('overflow-wrap: break-word');
stylesheet.insertRule('#' + elementId + '{' + rules.join(';') + '}', 0);
rules = [];
- rules.push('left: ' + (shapeBounds.x - 1) + units, 'top: ' + (shapeBounds.y - 1) + units, 'width: ' + rectangleBounds[2], 'height: ' + rectangleBounds[3]);
+ rules.push('left: ' + (shapeBounds.x - 1) + units, 'top: ' + (shapeBounds.y - 1) + units, 'width: ' + shapeBounds.width + units, 'height: ' + shapeBounds.height + units);
rules.push('position: absolute', 'display: block', 'content: \' \'');
rules.push('border: 1px solid blue');
stylesheet.insertRule('#' + elementId + ':before{' + rules.join(';') + '}', 0);

Powered by Google App Engine
This is Rietveld 408576698