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

Side by Side Diff: third_party/WebKit/LayoutTests/external/csswg-test/css-grid-1/grid-definition/support/testing-utils.js

Issue 2670473003: [css-grid] Import W3C Test Suite (Closed)
Patch Set: Add comment about skipped tests Created 3 years, 10 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
OLDNEW
(Empty)
1 var TestingUtils = (function() {
2
3 function checkGridTemplateColumns(element, value) {
4 assert_in_array(getComputedStyle(element).gridTemplateColumns, value, "g ridTemplateColumns");
5 }
6
7 function checkGridTemplateRows(element, value) {
8 assert_in_array(getComputedStyle(element).gridTemplateRows, value, "grid TemplateRows");
9 }
10
11 function testGridTemplateColumnsRows(gridId, columnsStyle, rowsStyle, column sComputedValue, rowsComputedValue) {
12 test(function() {
13 var grid = document.getElementById(gridId);
14 grid.style.gridTemplateColumns = columnsStyle;
15 grid.style.gridTemplateRows = rowsStyle;
16 checkGridTemplateColumns(grid, columnsComputedValue);
17 checkGridTemplateRows(grid, rowsComputedValue);
18 }, "'" + gridId + "' with: grid-template-columns: " + columnsStyle + "; and grid-template-rows: " + rowsStyle + ";");
19 }
20
21 function checkGridTemplateAreas(element, value) {
22 assert_in_array(getComputedStyle(element).gridTemplateAreas, value, "gri dTemplateAreas");
23 }
24
25 function testGridTemplateAreas(gridId, style, value) {
26 test(function() {
27 var grid = document.getElementById(gridId);
28 grid.style.gridTemplateAreas = style;
29 checkGridTemplateAreas(grid, value);
30 }, "'" + gridId + "' with: grid-template-areas: " + style + ";");
31 }
32
33 return {
34 testGridTemplateColumnsRows: testGridTemplateColumnsRows,
35 testGridTemplateAreas: testGridTemplateAreas
36 }
37 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698