diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-09-08 11:01:17 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-09-08 11:01:17 +0200 |
commit | 5abfa12a4c8f899f7a6a92deb3293507aeb23705 (patch) | |
tree | 34139730db00a41ceda70cee826349ecec421a6b /tests/wpt/css-tests/css-variables-1_dev/xhtml1 | |
parent | 282f9ade931342e9cd1ae72fde9dd9f88cb5b34a (diff) | |
download | servo-5abfa12a4c8f899f7a6a92deb3293507aeb23705.tar.gz servo-5abfa12a4c8f899f7a6a92deb3293507aeb23705.zip |
Update CSS tests to revision 09d27d61d637da536af1d86a8d7bea157592ff9e
Diffstat (limited to 'tests/wpt/css-tests/css-variables-1_dev/xhtml1')
14 files changed, 50 insertions, 58 deletions
diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/chapter-3.xht b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/chapter-3.xht index 429a7818dcd..9bab435bdd0 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/chapter-3.xht +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/chapter-3.xht @@ -37,9 +37,9 @@ <a href="css-vars-custom-property-case-sensitive-001.xht">css-vars-custom-property-case-sensitive-001</a></strong></td> <td><a href="reference/css-vars-custom-property-case-sensitive-ref.xht">=</a> </td> <td></td> - <td>custom property names start with "var-" in lower case + <td>custom property names are case-sensitive <ul class="assert"> - <li>Custom property names start with var- which must be lower case</li> + <li>Custom property names are case-sensitive</li> </ul> </td> </tr> diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/css-vars-custom-property-case-sensitive-001.xht b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/css-vars-custom-property-case-sensitive-001.xht index 809531004fe..dd06c41a7ea 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/css-vars-custom-property-case-sensitive-001.xht +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/css-vars-custom-property-case-sensitive-001.xht @@ -1,26 +1,27 @@ <!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> - <title>CSS Variables Test: custom property names start with "var-" in lower case</title> + <title>CSS Variables Test: custom property names are case-sensitive</title> <meta charset="UTF-8" /> <link href="mailto:noahcollins@gmail.com" rel="author" title="Noah Collins" /> <link href="http://www.w3.org/TR/css-variables-1/#using-variables" rel="help" /> - <meta content="Custom property names start with var- which must be lower case" name="assert" /> + <meta content="Custom property names are case-sensitive" name="assert" /> <link href="reference/css-vars-custom-property-case-sensitive-ref.xht" rel="match" /> <style type="text/css"> :root { - /* these should be VALID custom property names */ - var-veryblue: #22e; - var-AlsoBlue: #22e; + --veryblue: #22e; + --AlsoBlue: #22e; - /* these should be INVALID custom property names */ - VAR-veryred: #f00; - Var-AlsoRed: #f00; + --veryred: #f00; + --AlsoRed: #f00; } - .blue-good-1 { color: var(veryblue); } - .blue-good-2 { color: var(AlsoBlue); } - .red-bad-1 { color: var(veryred); } - .red-bad-2 { color: var(AlsoRed); } + /* These match the case of the declarations */ + .blue-good-1 { color: var(--veryblue); } + .blue-good-2 { color: var(--AlsoBlue); } + + /* These DO NOT match the case of the declarations */ + .red-bad-1 { color: var(--VeryRed); } + .red-bad-2 { color: var(--alsored); } </style> </head> <body> @@ -32,4 +33,5 @@ <p class="red-bad-1">This paragraph is styled using an invalid CSS Variable name. Fail if red.</p> <p class="red-bad-2">This paragraph is styled using an invalid CSS Variable name. Fail if red.</p> + </body></html>
\ No newline at end of file diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/css-vars-custom-property-inheritance.xht b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/css-vars-custom-property-inheritance.xht index 88a2f98960d..23bc29978e9 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/css-vars-custom-property-inheritance.xht +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/css-vars-custom-property-inheritance.xht @@ -9,14 +9,14 @@ <style type="text/css"> /* test cascade importance */ - :root { var-color: #1c1 !important; } - :root { var-color: red; } + :root { --color: #1c1 !important; } + :root { --color: red; } /* test cascade order */ * { color: red; } /* test cascade order */ - * { color: var(color); } + * { color: var(--color); } </style> </head> @@ -26,4 +26,5 @@ <p>Green</p> <p>The test passes if everything is green. Any red means the test failed.</p> + </body></html>
\ No newline at end of file diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/css-vars-custom-property-case-sensitive-ref.xht b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/css-vars-custom-property-case-sensitive-ref.xht index 4eff0b14dd8..7a6536a0cf7 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/css-vars-custom-property-case-sensitive-ref.xht +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/css-vars-custom-property-case-sensitive-ref.xht @@ -1,23 +1,11 @@ <!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> - <title>CSS Variables Test: custom property names start with "var-" in lower case</title> + <title>CSS Variables Test: custom property names are case-sensitive</title> <meta charset="UTF-8" /> <link href="mailto:noahcollins@gmail.com" rel="author" title="Noah Collins" /> <style type="text/css"> - :root { - /* these should be VALID custom property names */ - var-veryblue: #22e; - var-AlsoBlue: #22e; - - /* these should be INVALID custom property names */ - VAR-veryred: #f00; - Var-AlsoRed: #f00; - } - - .blue-good-1 { color: var(veryblue); } - .blue-good-2 { color: var(AlsoBlue); } - .red-bad-1 { color: var(veryred); } - .red-bad-2 { color: var(AlsoRed); } + .blue-good-1 { color: #22e; } + .blue-good-2 { color: #22e; } </style> </head> <body> @@ -29,4 +17,5 @@ <p>This paragraph is styled using an invalid CSS Variable name. Fail if red.</p> <p>This paragraph is styled using an invalid CSS Variable name. Fail if red.</p> + </body></html>
\ No newline at end of file diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/Ahem.ttf b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/Ahem.ttf Binary files differnew file mode 100644 index 00000000000..ac81cb03165 --- /dev/null +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/Ahem.ttf diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/ahem.css b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/ahem.css index 0d4bcedc21b..82ee466791e 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/ahem.css +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/ahem.css @@ -1,4 +1,4 @@ @font-face { font-family: "Ahem"; - src: url(../../../../fonts/Ahem.ttf); + src: url(./Ahem.ttf); } diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/external-variable-font-face.css b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/external-variable-font-face.css index 38c86f0cca7..d9873734812 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/external-variable-font-face.css +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reference/support/external-variable-font-face.css @@ -1,11 +1,11 @@ @font-face { --a: MyTestFontName; font-family: var(--a); - src: url(../../../../fonts/Ahem.ttf); + src: url(./Ahem.ttf); } @font-face { font-family: MyTestFontName2; - src: url(../../../../fonts/Ahem.ttf); + src: url(./Ahem.ttf); } #a { font-family: MyTestFontName; diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reftest-toc.xht b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reftest-toc.xht index 8363b3229e0..ccc59a2528d 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reftest-toc.xht +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/reftest-toc.xht @@ -26,7 +26,7 @@ </thead> <tbody id="css-vars-custom-property-case-sensitive-001" class=""> <tr> - <td rowspan="1" title="custom property names start with "var-" in lower case"> + <td rowspan="1" title="custom property names are case-sensitive"> <a href="css-vars-custom-property-case-sensitive-001.xht">css-vars-custom-property-case-sensitive-001</a></td> <td><a href="reference/css-vars-custom-property-case-sensitive-ref.xht">=</a> </td> <td rowspan="1"></td> diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/Ahem.ttf b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/Ahem.ttf Binary files differnew file mode 100644 index 00000000000..ac81cb03165 --- /dev/null +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/Ahem.ttf diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/ahem.css b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/ahem.css index 0d4bcedc21b..82ee466791e 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/ahem.css +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/ahem.css @@ -1,4 +1,4 @@ @font-face { font-family: "Ahem"; - src: url(../../../../fonts/Ahem.ttf); + src: url(./Ahem.ttf); } diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/external-variable-font-face.css b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/external-variable-font-face.css index 38c86f0cca7..d9873734812 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/external-variable-font-face.css +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/support/external-variable-font-face.css @@ -1,11 +1,11 @@ @font-face { --a: MyTestFontName; font-family: var(--a); - src: url(../../../../fonts/Ahem.ttf); + src: url(./Ahem.ttf); } @font-face { font-family: MyTestFontName2; - src: url(../../../../fonts/Ahem.ttf); + src: url(./Ahem.ttf); } #a { font-family: MyTestFontName; diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/test_variable_legal_values.xht b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/test_variable_legal_values.xht index 22f6a36dbe1..03b0a669279 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/test_variable_legal_values.xht +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/test_variable_legal_values.xht @@ -62,13 +62,13 @@ function run() { function assert_allowed_variable_value(value, description) { test(function() { styleText.data = "#test { \n" + - " var-test: red;\n" + - " var-test: " + value + ";\n" + + " --test: red;\n" + + " --test: " + value + ";\n" + " background-color: red;\n" + - " background-color: var(test);\n" + + " background-color: var(--test);\n" + "}"; - assert_true(initial_cs != red_cs && - initial_cs == test_cs.backgroundColor); + assert_not_equals(initial_cs, red_cs); + assert_equals(initial_cs, test_cs.backgroundColor); }, description_to_name(description), { assert: "Value allowed within variable: " + description }); @@ -77,13 +77,13 @@ function run() { function assert_disallowed_balanced_variable_value(value, description) { test(function() { styleText.data = "#test { \n" + - " var-test: green;\n" + - " var-test: " + value + ";\n" + + " --test: green;\n" + + " --test: " + value + ";\n" + " background-color: red;\n" + - " background-color: var(test);\n" + + " background-color: var(--test);\n" + "}"; - assert_true(green_cs != red_cs && - green_cs == test_cs.backgroundColor); + assert_not_equals(green_cs, red_cs); + assert_equals(green_cs, test_cs.backgroundColor); }, description_to_name(description), { assert: "Value not allowed within variable: " + description }); @@ -107,11 +107,11 @@ function run() { assert_disallowed_balanced_variable_value("(])", "unbalanced close bracket in something balanced"); assert_disallowed_balanced_variable_value("[)]", "unbalanced close paren in something balanced"); assert_disallowed_balanced_variable_value("(})", "unbalanced close brace in something balanced"); - assert_allowed_variable_value("&lt;!--", "CDO at top level"); - assert_allowed_variable_value("--&gt;", "CDC at top level"); - assert_allowed_variable_value("(;)", "semicolon not at top level (value -&gt; unused)"); - assert_allowed_variable_value("(&lt;!--)", "CDO not at top level (value -&gt; unused)"); - assert_allowed_variable_value("(--&gt;)", "CDC not at top level (value -&gt; unused)"); + assert_allowed_variable_value("<!--", "CDO at top level"); + assert_allowed_variable_value("-->", "CDC at top level"); + assert_allowed_variable_value("(;)", "semicolon not at top level (value -> unused)"); + assert_allowed_variable_value("(<!--)", "CDO not at top level (value -> unused)"); + assert_allowed_variable_value("(-->)", "CDC not at top level (value -> unused)"); done(); } diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/variable-font-face-01.xht b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/variable-font-face-01.xht index 0693864df8b..65bfeda07d0 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/variable-font-face-01.xht +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/variable-font-face-01.xht @@ -11,11 +11,11 @@ @font-face { --a: MyTestFontName; font-family: var(--a); - src: url(../../../fonts/Ahem.ttf); + src: url(support/Ahem.ttf); } @font-face { font-family: MyTestFontName2; - src: url(../../../fonts/Ahem.ttf); + src: url(support/Ahem.ttf); } #a { font-family: MyTestFontName; diff --git a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/variable-font-face-02.xht b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/variable-font-face-02.xht index 0e3dcee9663..7b52055d3ca 100644 --- a/tests/wpt/css-tests/css-variables-1_dev/xhtml1/variable-font-face-02.xht +++ b/tests/wpt/css-tests/css-variables-1_dev/xhtml1/variable-font-face-02.xht @@ -13,11 +13,11 @@ } @font-face { font-family: var(--a); - src: url(../../../fonts/Ahem.ttf); + src: url(support/Ahem.ttf); } @font-face { font-family: MyTestFontName2; - src: url(../../../fonts/Ahem.ttf); + src: url(support/Ahem.ttf); } #a { font-family: MyTestFontName; |