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
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>CSS Grid Layout Test: Reference file 2x2 grid and cells with the following colors: blue, yellow, lime and magenta</title>
|
||||
<style type="text/css">
|
||||
@page { font: italic 8pt sans-serif; color: gray;
|
||||
margin: 7%;
|
||||
counter-increment: page;
|
||||
@top-left { content: "CSS Grid Layout Module Level 1 CR Test Suite"; }
|
||||
@top-right { content: "Test grid-2x2-blue-yellow-lime-magenta"; }
|
||||
@bottom-right { content: counter(page); }
|
||||
}
|
||||
</style>
|
||||
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com" />
|
||||
<style type="text/css"><![CDATA[
|
||||
div {
|
||||
font: 50px/1 Ahem;
|
||||
}
|
||||
|
||||
#blue {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
#yellow {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
#lime {
|
||||
color: lime;
|
||||
}
|
||||
|
||||
#magenta {
|
||||
color: magenta;
|
||||
}
|
||||
]]></style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if there are four filled squares with the same size and <strong>no red</strong>.</p>
|
||||
<p>Blue and yellow squares in the first line; lime and magenta squares in the second line (exactly in this order).</p>
|
||||
|
||||
<div>
|
||||
<span id="blue">B</span><span id="yellow">Y</span>
|
||||
<br />
|
||||
<span id="lime">L</span><span id="magenta">M</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>CSS Grid Layout Test: Reference file 3 overlapped squares the following colors: blue, yellow and green</title>
|
||||
<style type="text/css">
|
||||
@page { font: italic 8pt sans-serif; color: gray;
|
||||
margin: 7%;
|
||||
counter-increment: page;
|
||||
@top-left { content: "CSS Grid Layout Module Level 1 CR Test Suite"; }
|
||||
@top-right { content: "Test grid-filled-blue-yellow-green-overlapped-100px-squares"; }
|
||||
@bottom-right { content: counter(page); }
|
||||
}
|
||||
</style>
|
||||
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com" />
|
||||
<style type="text/css"><![CDATA[
|
||||
#main {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#main div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background-color: blue;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
background-color: yellow;
|
||||
position: absolute;
|
||||
left: 25px;
|
||||
top: 25px;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: green;
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
top: 50px;
|
||||
}
|
||||
]]></style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if there are 3 filled squares with the same size, and <strong>green</strong> is overlapping <strong>yellow</strong> which is overlapping <strong>blue</strong>.</p>
|
||||
|
||||
<div id="main">
|
||||
<div class="blue"></div>
|
||||
<div class="yellow"></div>
|
||||
<div class="green"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>CSS Grid Layout Test: Reference file text first letter should be green and margins do not collapse</title>
|
||||
<style type="text/css">
|
||||
@page { font: italic 8pt sans-serif; color: gray;
|
||||
margin: 7%;
|
||||
counter-increment: page;
|
||||
@top-left { content: "CSS Grid Layout Module Level 1 CR Test Suite"; }
|
||||
@top-right { content: "Test grid-first-letter-green-margin-no-collapse-ref"; }
|
||||
@bottom-right { content: counter(page); }
|
||||
}
|
||||
</style>
|
||||
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com" />
|
||||
<style type="text/css"><![CDATA[
|
||||
p {
|
||||
/* Prevent collapsing body and paragraph margins. */
|
||||
float: left;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: green;
|
||||
}
|
||||
]]></style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<span class="green">T</span>he <strong>first letter</strong> of this paragraph, and only that one, should be <strong>green</strong>.
|
||||
In addition, body and paragraph margins should <strong>not collapse</strong>.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>CSS Grid Layout Test: Reference file text should be green and margins do not collapse</title>
|
||||
<style type="text/css">
|
||||
@page { font: italic 8pt sans-serif; color: gray;
|
||||
margin: 7%;
|
||||
counter-increment: page;
|
||||
@top-left { content: "CSS Grid Layout Module Level 1 CR Test Suite"; }
|
||||
@top-right { content: "Test grid-text-green-margin-no-collapse-ref"; }
|
||||
@bottom-right { content: counter(page); }
|
||||
}
|
||||
</style>
|
||||
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com" />
|
||||
<style type="text/css"><![CDATA[
|
||||
p {
|
||||
color: green;
|
||||
/* Prevent collapsing body and paragraph margins. */
|
||||
float: left;
|
||||
}
|
||||
]]></style>
|
||||
</head>
|
||||
<body>
|
||||
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
|
||||
</body>
|
||||
</html>
|
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