mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update CSS tests to revision 2baa72daab8bf37e3e910a9fd311a1eaa5b0f4a8
This commit is contained in:
parent
662c00a810
commit
df03062d62
10934 changed files with 428309 additions and 254265 deletions
Binary file not shown.
After Width: | Height: | Size: 343 B |
Binary file not shown.
After Width: | Height: | Size: 461 B |
Binary file not shown.
After Width: | Height: | Size: 218 B |
|
@ -0,0 +1,33 @@
|
|||
var TestingUtils = (function() {
|
||||
|
||||
function checkGridTemplateColumns(element, value) {
|
||||
assert_in_array(getComputedStyle(element).gridTemplateColumns, value, "gridTemplateColumns");
|
||||
}
|
||||
|
||||
function checkGridTemplateRows(element, value) {
|
||||
assert_in_array(getComputedStyle(element).gridTemplateRows, value, "gridTemplateRows");
|
||||
}
|
||||
|
||||
function testGridTemplateColumnsRows(gridId, columnsStyle, rowsStyle, columnsComputedValue, rowsComputedValue) {
|
||||
test(function() {
|
||||
var grid = document.getElementById(gridId);
|
||||
grid.style.gridTemplateColumns = columnsStyle;
|
||||
grid.style.gridTemplateRows = rowsStyle;
|
||||
checkGridTemplateColumns(grid, columnsComputedValue);
|
||||
checkGridTemplateRows(grid, rowsComputedValue);
|
||||
}, "'" + gridId + "' with: grid-template-columns: " + columnsStyle + "; and grid-template-rows: " + rowsStyle + ";");
|
||||
}
|
||||
|
||||
function testGridTemplateAreas(gridId, style, value) {
|
||||
test(function() {
|
||||
var grid = document.getElementById(gridId);
|
||||
grid.style.gridTemplateAreas = style;
|
||||
assert_equals(getComputedStyle(grid).gridTemplateAreas, value, "gridTemplateAreas");
|
||||
}, "'" + gridId + "' with: grid-template-areas: " + style + ";");
|
||||
}
|
||||
|
||||
return {
|
||||
testGridTemplateColumnsRows: testGridTemplateColumnsRows,
|
||||
testGridTemplateAreas: testGridTemplateAreas
|
||||
}
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue