aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/css-tests/css-variables-1_dev/html
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2017-02-06 11:06:12 +0100
committerMs2ger <Ms2ger@gmail.com>2017-02-06 22:38:29 +0100
commit296fa2512ba2fbc8f1d6b7e82e30ad3b5d2a9a20 (patch)
tree95ac50cd05fa8a22d1c0fa12016ee0d2012a165c /tests/wpt/css-tests/css-variables-1_dev/html
parentfb4f421c8b9cbf80a86c9c5eb88395d7008b27a1 (diff)
downloadservo-296fa2512ba2fbc8f1d6b7e82e30ad3b5d2a9a20.tar.gz
servo-296fa2512ba2fbc8f1d6b7e82e30ad3b5d2a9a20.zip
Update web-platform-tests and CSS tests.
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
Diffstat (limited to 'tests/wpt/css-tests/css-variables-1_dev/html')
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/chapter-2.htm12
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/chapter-3.htm20
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/reference/variable-reference-without-whitespace-ref.htm15
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/reference/vars-background-shorthand-001-ref.htm22
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/reference/vars-font-shorthand-001-ref.htm30
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/reftest-toc.htm24
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/reftest.list3
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/test_variable_legal_values.htm2
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/toc.htm4
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/variable-reference-without-whitespace.htm53
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/vars-background-shorthand-001.htm44
-rw-r--r--tests/wpt/css-tests/css-variables-1_dev/html/vars-font-shorthand-001.htm69
12 files changed, 291 insertions, 7 deletions
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/chapter-2.htm b/tests/wpt/css-tests/css-variables-1_dev/html/chapter-2.htm
index b8bfa2b4da2..4e03e8a3b61 100644
--- a/tests/wpt/css-tests/css-variables-1_dev/html/chapter-2.htm
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/chapter-2.htm
@@ -13,7 +13,7 @@
<body>
<h1>CSS Custom Properties Level 1 CR Test Suite</h1>
- <h2>Defining Custom Properties: the --* family of properties (96 tests)</h2>
+ <h2>Defining Custom Properties: the --* family of properties (97 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
@@ -335,7 +335,7 @@
<tr><th colspan="4" scope="rowgroup">
<a href="#s2.1">+</a>
<a href="https://www.w3.org/TR/css-variables-1/#syntax">2.1 Custom Property Value Syntax</a></th></tr>
- <!-- 55 tests -->
+ <!-- 56 tests -->
<tr id="variable-declaration-01-2.1" class="">
<td>
<a href="variable-declaration-01.htm">variable-declaration-01</a></td>
@@ -568,6 +568,14 @@
<td>Test declaring a variable in an external CSS file.
</td>
</tr>
+ <tr id="variable-reference-without-whitespace-2.1" class="">
+ <td>
+ <a href="variable-reference-without-whitespace.htm">variable-reference-without-whitespace</a></td>
+ <td><a href="reference/variable-reference-without-whitespace-ref.htm">=</a> </td>
+ <td></td>
+ <td>Variable reference without whitespace
+ </td>
+ </tr>
<tr id="variable-supports-33-2.1" class="">
<td>
<a href="variable-supports-33.htm">variable-supports-33</a></td>
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/chapter-3.htm b/tests/wpt/css-tests/css-variables-1_dev/html/chapter-3.htm
index 01ed88cf92a..29328fa9304 100644
--- a/tests/wpt/css-tests/css-variables-1_dev/html/chapter-3.htm
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/chapter-3.htm
@@ -13,7 +13,7 @@
<body>
<h1>CSS Custom Properties Level 1 CR Test Suite</h1>
- <h2>Using Cascading Variables: the var() notation (79 tests)</h2>
+ <h2>Using Cascading Variables: the var() notation (81 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
@@ -678,7 +678,7 @@
<tr><th colspan="4" scope="rowgroup">
<a href="#s3.2">+</a>
<a href="https://www.w3.org/TR/css-variables-1/#variables-in-shorthands">3.2 Variables in Shorthand Properties</a></th></tr>
- <!-- 3 tests -->
+ <!-- 5 tests -->
<tr id="variable-reference-36-3.2" class="">
<td>
<a href="variable-reference-36.htm">variable-reference-36</a></td>
@@ -703,6 +703,22 @@
<td>Test using variables in overlapping shorthands.
</td>
</tr>
+ <tr id="vars-background-shorthand-001-3.2" class="primary">
+ <td><strong>
+ <a href="vars-background-shorthand-001.htm">vars-background-shorthand-001</a></strong></td>
+ <td><a href="reference/vars-background-shorthand-001-ref.htm">=</a> </td>
+ <td></td>
+ <td>CSS Variables 1: Test variables in background shorthand.
+ </td>
+ </tr>
+ <tr id="vars-font-shorthand-001-3.2" class="primary ahem">
+ <td><strong>
+ <a href="vars-font-shorthand-001.htm">vars-font-shorthand-001</a></strong></td>
+ <td><a href="reference/vars-font-shorthand-001-ref.htm">=</a> </td>
+ <td><abbr class="ahem" title="Requires Ahem font">Ahem</abbr></td>
+ <td>CSS Variables 1: Test variables in @font-face, font-family, font shorthand.
+ </td>
+ </tr>
</tbody>
<tbody id="s3.2.#pending-substitution-value">
<!-- 0 tests -->
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/reference/variable-reference-without-whitespace-ref.htm b/tests/wpt/css-tests/css-variables-1_dev/html/reference/variable-reference-without-whitespace-ref.htm
new file mode 100644
index 00000000000..d749ff62dfc
--- /dev/null
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/reference/variable-reference-without-whitespace-ref.htm
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html><head><title>Variable reference without whitespace - reference</title>
+<link href="http://exyr.org/about/" rel="author" title="Simon Sapin">
+</head><body><p>The next four lines must be identical, containing only zeroes:
+</p><p>0 0 0
+</p><p>0 0 0
+</p><p>0 0 0
+</p><p>0 0 0
+
+</p><p>The next four lines must be identical, containing increasing integers:
+</p><p>1 2 3
+</p><p>1 2 3
+</p><p>1 2 3
+</p><p>1 2 3
+</p></body></html> \ No newline at end of file
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/reference/vars-background-shorthand-001-ref.htm b/tests/wpt/css-tests/css-variables-1_dev/html/reference/vars-background-shorthand-001-ref.htm
new file mode 100644
index 00000000000..d1b674a4476
--- /dev/null
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/reference/vars-background-shorthand-001-ref.htm
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html><head><title>CSS Variables 1: Test variables in background shorthand.</title>
+<link href="mailto:lea@verou.me" rel="author" title="Lea Verou">
+<style>
+div {
+ width: 50px;
+ height: 50px;
+ padding: 50px;
+ margin: 10px;
+ display: inline-block;
+ background: green;
+}
+</style>
+</head><body><p>Test passes if you see four green squares, and no red.</p>
+<div id="d1"></div>
+<div id="d2"></div>
+<div id="d3"></div>
+<div id="d4"></div>
+
+
+
+</body></html> \ No newline at end of file
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/reference/vars-font-shorthand-001-ref.htm b/tests/wpt/css-tests/css-variables-1_dev/html/reference/vars-font-shorthand-001-ref.htm
new file mode 100644
index 00000000000..d7138058a92
--- /dev/null
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/reference/vars-font-shorthand-001-ref.htm
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html><head><title>CSS Variables 1: Test variables in @font-face, font-family, font shorthand.</title>
+<link href="mailto:lea@verou.me" rel="author" title="Lea Verou">
+<style>
+
+
+
+div {
+ width: 150px;
+ height: 150px;
+ margin: 10px;
+ display: inline-block;
+ vertical-align: middle;
+ background: green;
+ text-align: center;
+ color: green;
+ overflow: hidden;
+}
+
+</style>
+</head><body><p>Test passes if you see six green squares, and no red.</p>
+<div id="d1">X</div>
+<div id="d2">X</div>
+<div id="d3">X</div>
+<div id="d4">X</div>
+<div id="d5">X</div>
+<div id="d6">X</div>
+
+
+</body></html> \ No newline at end of file
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/reftest-toc.htm b/tests/wpt/css-tests/css-variables-1_dev/html/reftest-toc.htm
index 7d50d8e0573..a89416c4b4d 100644
--- a/tests/wpt/css-tests/css-variables-1_dev/html/reftest-toc.htm
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/reftest-toc.htm
@@ -880,6 +880,14 @@
<td rowspan="1"></td>
</tr>
</tbody>
+ <tbody id="variable-reference-without-whitespace" class="">
+ <tr>
+ <td rowspan="1" title="Variable reference without whitespace">
+ <a href="variable-reference-without-whitespace.htm">variable-reference-without-whitespace</a></td>
+ <td><a href="reference/variable-reference-without-whitespace-ref.htm">=</a> </td>
+ <td rowspan="1"></td>
+ </tr>
+ </tbody>
<tbody id="variable-supports-01" class="">
<tr>
<td rowspan="1" title="Test a passing non-custom property declaration in an @supports rule where the property value contains a variable reference and no white space tokens.">
@@ -1416,6 +1424,22 @@
<td rowspan="1"></td>
</tr>
</tbody>
+ <tbody id="vars-background-shorthand-001" class="">
+ <tr>
+ <td rowspan="1" title="CSS Variables 1: Test variables in background shorthand.">
+ <a href="vars-background-shorthand-001.htm">vars-background-shorthand-001</a></td>
+ <td><a href="reference/vars-background-shorthand-001-ref.htm">=</a> </td>
+ <td rowspan="1"></td>
+ </tr>
+ </tbody>
+ <tbody id="vars-font-shorthand-001" class="ahem">
+ <tr>
+ <td rowspan="1" title="CSS Variables 1: Test variables in @font-face, font-family, font shorthand.">
+ <a href="vars-font-shorthand-001.htm">vars-font-shorthand-001</a></td>
+ <td><a href="reference/vars-font-shorthand-001-ref.htm">=</a> </td>
+ <td rowspan="1"><abbr class="ahem" title="Requires Ahem font">Ahem</abbr></td>
+ </tr>
+ </tbody>
</table>
</body>
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/reftest.list b/tests/wpt/css-tests/css-variables-1_dev/html/reftest.list
index 5a47e17ae20..75c588d8b7e 100644
--- a/tests/wpt/css-tests/css-variables-1_dev/html/reftest.list
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/reftest.list
@@ -106,6 +106,7 @@ variable-reference-37.htm == reference/variable-reference-37-ref.htm
variable-reference-38.htm == reference/variable-reference-38-ref.htm
variable-reference-39.htm == support/color-green-ref.htm
variable-reference-40.htm == reference/variable-reference-40-ref.htm
+variable-reference-without-whitespace.htm == reference/variable-reference-without-whitespace-ref.htm
variable-supports-01.htm == support/color-green-ref.htm
variable-supports-02.htm == support/color-green-ref.htm
variable-supports-03.htm == support/color-green-ref.htm
@@ -173,3 +174,5 @@ variable-supports-64.htm == support/color-green-ref.htm
variable-supports-65.htm == support/color-green-ref.htm
variable-supports-66.htm == support/color-green-ref.htm
variable-supports-67.htm == support/color-green-ref.htm
+vars-background-shorthand-001.htm == reference/vars-background-shorthand-001-ref.htm
+vars-font-shorthand-001.htm == reference/vars-font-shorthand-001-ref.htm
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/test_variable_legal_values.htm b/tests/wpt/css-tests/css-variables-1_dev/html/test_variable_legal_values.htm
index 965fa5e957a..e67ae00efb5 100644
--- a/tests/wpt/css-tests/css-variables-1_dev/html/test_variable_legal_values.htm
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/test_variable_legal_values.htm
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html><head>
<title>CSS Variables Allowed Syntax</title>
- <link href="http://dbaron.org/" rel="author" title="L. David Baron">
+ <link href="https://dbaron.org/" rel="author" title="L. David Baron">
<link href="http://mozilla.com/" rel="author" title="Mozilla Corporation">
<link href="http://www.w3.org/TR/css-variables-1/#defining-variables" rel="help">
<meta content='The <value> type used in the syntax above is defined as anything matching the "value" production in CSS 2.1 Chapter 4.1 [CSS21].' name="assert">
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/toc.htm b/tests/wpt/css-tests/css-variables-1_dev/html/toc.htm
index 0f2aff6a75b..681f4a6b4e5 100644
--- a/tests/wpt/css-tests/css-variables-1_dev/html/toc.htm
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/toc.htm
@@ -27,12 +27,12 @@
<tbody id="s2">
<tr><th><a href="chapter-2.htm">Chapter 2 -
Defining Custom Properties: the --* family of properties</a></th>
- <td>(96 Tests)</td></tr>
+ <td>(97 Tests)</td></tr>
</tbody>
<tbody id="s3">
<tr><th><a href="chapter-3.htm">Chapter 3 -
Using Cascading Variables: the var() notation</a></th>
- <td>(79 Tests)</td></tr>
+ <td>(81 Tests)</td></tr>
</tbody>
<tbody id="s4">
<tr><th><a href="chapter-4.htm">Chapter 4 -
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/variable-reference-without-whitespace.htm b/tests/wpt/css-tests/css-variables-1_dev/html/variable-reference-without-whitespace.htm
new file mode 100644
index 00000000000..470da1a6556
--- /dev/null
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/variable-reference-without-whitespace.htm
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html><head><title>Variable reference without whitespace</title>
+<link href="reference/variable-reference-without-whitespace-ref.htm" rel="match">
+<link href="http://www.w3.org/TR/css-variables-1/#syntax" rel="help">
+<link href="http://exyr.org/about/" rel="author" title="Simon Sapin">
+<meta content="
+ A variable reference followed by something without whitespace in between
+ must not be interpreted together as a single identifier.
+ Custom property values are sequences of tokens, not strings." rel="assert">
+<style>
+p {
+ counter-reset: -- --a -a;
+ --dash:-;
+}
+
+#test_1 span::before {
+ counter-increment: var(--dash)-;
+ content: counter(--);
+}
+#test_2 span::before {
+ counter-increment: var(--dash)-a;
+ content: counter(--a);
+}
+#test_3 span::before {
+ counter-increment: var(--dash)a;
+ content: counter(-a);
+}
+
+#control_1 span::before {
+ counter-increment: --;
+ content: counter(--);
+}
+#control_2 span::before {
+ counter-increment: --a;
+ content: counter(--a);
+}
+#control_3 span::before {
+ counter-increment: -a;
+ content: counter(-a);
+}
+</style>
+</head><body><p>The next four lines must be identical, containing only zeroes:
+</p><p id="test_1"><span></span> <span></span> <span></span>
+</p><p id="test_2"><span></span> <span></span> <span></span>
+</p><p id="test_3"><span></span> <span></span> <span></span>
+</p><p>0 0 0
+
+</p><p>The next four lines must be identical, containing increasing integers:
+</p><p id="control_1"><span></span> <span></span> <span></span>
+</p><p id="control_2"><span></span> <span></span> <span></span>
+</p><p id="control_3"><span></span> <span></span> <span></span>
+</p><p>1 2 3
+</p></body></html> \ No newline at end of file
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/vars-background-shorthand-001.htm b/tests/wpt/css-tests/css-variables-1_dev/html/vars-background-shorthand-001.htm
new file mode 100644
index 00000000000..cd4367a1f23
--- /dev/null
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/vars-background-shorthand-001.htm
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html><head><title>CSS Variables 1: Test variables in background shorthand.</title>
+<link href="mailto:lea@verou.me" rel="author" title="Lea Verou">
+<link href="https://www.w3.org/TR/css-variables-1/#variables-in-shorthands" rel="help">
+<link href="reference/vars-background-shorthand-001-ref.htm" rel="match">
+<style>
+div {
+ width: 50px;
+ height: 50px;
+ padding: 50px;
+ margin: 10px;
+ display: inline-block;
+ background: red;
+}
+
+div#d1 {
+ --foo: green;
+ background: var(--foo);
+}
+
+div#d2 {
+ --foo: green, green;
+ background: linear-gradient(var(--foo));
+}
+
+div#d3 {
+ --foo: linear-gradient(green, green);
+ background: var(--foo);
+}
+
+div#d4 {
+ --foo: center / 0 0;
+ background: green linear-gradient(red, red) var(--foo, );
+}
+</style>
+</head><body><p>Test passes if you see four green squares, and no red.</p>
+<div id="d1"></div>
+<div id="d2"></div>
+<div id="d3"></div>
+<div id="d4"></div>
+
+
+
+</body></html> \ No newline at end of file
diff --git a/tests/wpt/css-tests/css-variables-1_dev/html/vars-font-shorthand-001.htm b/tests/wpt/css-tests/css-variables-1_dev/html/vars-font-shorthand-001.htm
new file mode 100644
index 00000000000..bf9912de788
--- /dev/null
+++ b/tests/wpt/css-tests/css-variables-1_dev/html/vars-font-shorthand-001.htm
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html><head><title>CSS Variables 1: Test variables in @font-face, font-family, font shorthand.</title>
+<link href="mailto:lea@verou.me" rel="author" title="Lea Verou">
+<link href="https://www.w3.org/TR/css-variables-1/#variables-in-shorthands" rel="help">
+<link href="reference/vars-font-shorthand-001-ref.htm" rel="match">
+<meta content="ahem" name="flags">
+<style>
+
+@font-face {
+ font-family: Ahem;
+ src: url(https://cdn.rawgit.com/w3c/csswg-test/master/fonts/ahem/ahem.ttf);
+}
+
+div {
+ width: 150px;
+ height: 150px;
+ margin: 10px;
+ display: inline-block;
+ vertical-align: middle;
+ background: red;
+ text-align: center;
+ color: green;
+ overflow: hidden;
+}
+
+div#d1 {
+ --foo: Ahem;
+ font-family: var(--foo);
+ font-size: 150px;
+ line-height: 1;
+}
+
+div#d2 {
+ --foo: 0 Ahem;
+ font: var(--foo);
+ font-size: 150px;
+ line-height: 150px;
+}
+
+div#d3 {
+ --foo: Ahem, sans-serif;
+ font: 150px/1 var(--foo);
+}
+
+div#d4 {
+ --foo: Ahem;
+ font: 150px/1 var(--foo), sans-serif;
+}
+
+div#d5 {
+ --foo: 1 Ahem;
+ font: 150px/var(--foo);
+}
+
+div#d6 {
+ --foo: 150px/1 Ahem;
+ font: var(--foo);
+}
+</style>
+</head><body><p>Test passes if you see six green squares, and no red.</p>
+<div id="d1">X</div>
+<div id="d2">X</div>
+<div id="d3">X</div>
+<div id="d4">X</div>
+<div id="d5">X</div>
+<div id="d6">X</div>
+
+
+</body></html> \ No newline at end of file