diff options
author | James Graham <james@hoppipolla.co.uk> | 2015-07-27 17:47:31 +0100 |
---|---|---|
committer | James Graham <james@hoppipolla.co.uk> | 2015-07-27 17:47:31 +0100 |
commit | df03062d626f485dd896ce9c4374dfce447dc657 (patch) | |
tree | a96bdde06c6cd88dd68bc5ef4de8277fc6250a60 /tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference | |
parent | 662c00a8109c49d4c57343156b774441f4f48640 (diff) | |
download | servo-df03062d626f485dd896ce9c4374dfce447dc657.tar.gz servo-df03062d626f485dd896ce9c4374dfce447dc657.zip |
Update CSS tests to revision 2baa72daab8bf37e3e910a9fd311a1eaa5b0f4a8
Diffstat (limited to 'tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference')
8 files changed, 194 insertions, 0 deletions
diff --git a/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-2x2-blue-yellow-lime-magenta.xht b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-2x2-blue-yellow-lime-magenta.xht new file mode 100644 index 00000000000..ec71321ee17 --- /dev/null +++ b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-2x2-blue-yellow-lime-magenta.xht @@ -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>
\ No newline at end of file diff --git a/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-filled-blue-yellow-green-overlapped-100px-squares.xht b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-filled-blue-yellow-green-overlapped-100px-squares.xht new file mode 100644 index 00000000000..5829f4f7a6a --- /dev/null +++ b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-filled-blue-yellow-green-overlapped-100px-squares.xht @@ -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>
\ No newline at end of file diff --git a/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-first-letter-green-margin-no-collapse-ref.xht b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-first-letter-green-margin-no-collapse-ref.xht new file mode 100644 index 00000000000..3913386abd1 --- /dev/null +++ b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-first-letter-green-margin-no-collapse-ref.xht @@ -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>
\ No newline at end of file diff --git a/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-text-green-margin-no-collapse-ref.xht b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-text-green-margin-no-collapse-ref.xht new file mode 100644 index 00000000000..c0e0fcce26b --- /dev/null +++ b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/grid-text-green-margin-no-collapse-ref.xht @@ -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>
\ No newline at end of file diff --git a/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/100x100-green.png b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/100x100-green.png Binary files differnew file mode 100644 index 00000000000..3883542392f --- /dev/null +++ b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/100x100-green.png diff --git a/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/200x200-green.png b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/200x200-green.png Binary files differnew file mode 100644 index 00000000000..7a47c0e5e7a --- /dev/null +++ b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/200x200-green.png diff --git a/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/60x60-green.png b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/60x60-green.png Binary files differnew file mode 100644 index 00000000000..b3c8cf3eb4c --- /dev/null +++ b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/60x60-green.png diff --git a/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/testing-utils.js b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/testing-utils.js new file mode 100644 index 00000000000..c4ceec3a805 --- /dev/null +++ b/tests/wpt/css-tests/css-grid-1_dev/xhtml1print/reference/support/testing-utils.js @@ -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 + } +})(); |