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

Side by Side Diff: LayoutTests/fast/shapes/resources/simple-polygon.js

Issue 20806004: Remove Explicit Shapes Enablement in Tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Enabled by default, no need to call internals Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // The functions in this file are intended to be used to test non-complex polygo ns 1 // The functions in this file are intended to be used to test non-complex polygo ns
2 // where horizontal lines that overlap the polygon only cross the polygon twice. 2 // where horizontal lines that overlap the polygon only cross the polygon twice.
3 if (window.internals)
4 window.internals.settings.setCSSExclusionsEnabled(true);
5
6 function createPolygon(vertices) { 3 function createPolygon(vertices) {
7 var xCoordinates = vertices.map( function(p) { return p.x; } ); 4 var xCoordinates = vertices.map( function(p) { return p.x; } );
8 var yCoordinates = vertices.map( function(p) { return p.y; } ); 5 var yCoordinates = vertices.map( function(p) { return p.y; } );
9 return { 6 return {
10 vertices: vertices, 7 vertices: vertices,
11 minX: Math.min.apply(null, xCoordinates), 8 minX: Math.min.apply(null, xCoordinates),
12 maxX: Math.max.apply(null, xCoordinates), 9 maxX: Math.max.apply(null, xCoordinates),
13 minY: Math.min.apply(null, yCoordinates), 10 minY: Math.min.apply(null, yCoordinates),
14 maxY: Math.max.apply(null, yCoordinates) 11 maxY: Math.max.apply(null, yCoordinates)
15 }; 12 };
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 positionInformativeText("informative-text", stylesheet, polygon, lineHeight) 238 positionInformativeText("informative-text", stylesheet, polygon, lineHeight)
242 } 239 }
243 240
244 function createPolygonShapeInsideTestCaseExpected() { 241 function createPolygonShapeInsideTestCaseExpected() {
245 var stylesheet = document.getElementById("stylesheet").sheet; 242 var stylesheet = document.getElementById("stylesheet").sheet;
246 var polygon = createPolygon(vertices); 243 var polygon = createPolygon(vertices);
247 generateSimulatedPolygonShapeInsideElement("polygon-shape-inside", styleshee t, polygon, lineHeight); 244 generateSimulatedPolygonShapeInsideElement("polygon-shape-inside", styleshee t, polygon, lineHeight);
248 generatePolygonSVGElements("polygon-svg-shape", stylesheet, polygon, lineHei ght); 245 generatePolygonSVGElements("polygon-svg-shape", stylesheet, polygon, lineHei ght);
249 positionInformativeText("informative-text", stylesheet, polygon, lineHeight) 246 positionInformativeText("informative-text", stylesheet, polygon, lineHeight)
250 } 247 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/shapes/resources/multi-segment-polygon.js ('k') | LayoutTests/fast/shapes/resources/simple-rectangle.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698