[css-lists] Import parsing tests for list-style-type: <string>
authorobrufau@igalia.com <obrufau@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2019 20:59:56 +0000 (20:59 +0000)
committerobrufau@igalia.com <obrufau@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2019 20:59:56 +0000 (20:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203807

Reviewed by Manuel Rego Casasnovas.

Import WPT tests.

* resources/import-expectations.json:
* web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt: Added.
* web-platform-tests/css/css-lists/parsing/list-style-type-computed.html: Added.
* web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt: Added.
* web-platform-tests/css/css-lists/parsing/list-style-type-valid.html: Added.
* web-platform-tests/css/css-lists/parsing/w3c-import.log: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252009 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/resources/import-expectations.json
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/w3c-import.log [new file with mode: 0644]

index fe2bb8d..d7c8507 100644 (file)
@@ -1,5 +1,21 @@
 2019-11-04  Oriol Brufau  <obrufau@igalia.com>
 
+        [css-lists] Import parsing tests for list-style-type: <string>
+        https://bugs.webkit.org/show_bug.cgi?id=203807
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        Import WPT tests.
+
+        * resources/import-expectations.json:
+        * web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt: Added.
+        * web-platform-tests/css/css-lists/parsing/list-style-type-computed.html: Added.
+        * web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt: Added.
+        * web-platform-tests/css/css-lists/parsing/list-style-type-valid.html: Added.
+        * web-platform-tests/css/css-lists/parsing/w3c-import.log: Added.
+
+2019-11-04  Oriol Brufau  <obrufau@igalia.com>
+
         [css-lists] Import tests for list-style-type: <string>
         https://bugs.webkit.org/show_bug.cgi?id=203759
 
index 038c3d6..a6784c4 100644 (file)
@@ -85,6 +85,7 @@
     "web-platform-tests/css/css-grid/parsing/": "import", 
     "web-platform-tests/css/css-images": "import", 
     "web-platform-tests/css/css-lists": "import", 
+    "web-platform-tests/css/css-lists/parsing": "import", 
     "web-platform-tests/css/css-logical": "import", 
     "web-platform-tests/css/css-multicol": "import", 
     "web-platform-tests/css/css-overflow": "import", 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt
new file mode 100644 (file)
index 0000000..00acc26
--- /dev/null
@@ -0,0 +1,27 @@
+
+PASS Property list-style-type value 'none' computes to 'none' 
+PASS Property list-style-type value 'disc' computes to 'disc' 
+PASS Property list-style-type value 'circle' computes to 'circle' 
+PASS Property list-style-type value 'square' computes to 'square' 
+PASS Property list-style-type value 'decimal' computes to 'decimal' 
+PASS Property list-style-type value 'decimal-leading-zero' computes to 'decimal-leading-zero' 
+PASS Property list-style-type value 'lower-roman' computes to 'lower-roman' 
+PASS Property list-style-type value 'upper-roman' computes to 'upper-roman' 
+PASS Property list-style-type value 'lower-greek' computes to 'lower-greek' 
+PASS Property list-style-type value 'lower-latin' computes to 'lower-latin' 
+PASS Property list-style-type value 'upper-latin' computes to 'upper-latin' 
+PASS Property list-style-type value 'armenian' computes to 'armenian' 
+PASS Property list-style-type value 'georgian' computes to 'georgian' 
+PASS Property list-style-type value 'lower-alpha' computes to 'lower-alpha' 
+PASS Property list-style-type value 'upper-alpha' computes to 'upper-alpha' 
+FAIL Property list-style-type value '"marker string"' computes to '"marker string"' assert_true: '"marker string"' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value '"Note: "' computes to '"Note: "' assert_true: '"Note: "' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value 'counter-Style-Name' computes to 'counter-Style-Name' assert_true: 'counter-Style-Name' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value 'CounterStyleName' computes to 'CounterStyleName' assert_true: 'CounterStyleName' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value 'symbols(cyclic "string")' computes to 'symbols(cyclic "string")' assert_true: 'symbols(cyclic "string")' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value 'symbols(cyclic "○" "●")' computes to 'symbols(cyclic "○" "●")' assert_true: 'symbols(cyclic "○" "●")' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value 'symbols(fixed "1")' computes to 'symbols(fixed "1")' assert_true: 'symbols(fixed "1")' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value 'symbols("string")' computes to 'symbols("string")' assert_true: 'symbols("string")' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value 'symbols(alphabetic "first" "second")' computes to 'symbols(alphabetic "first" "second")' assert_true: 'symbols(alphabetic "first" "second")' is a supported value for list-style-type. expected true got false
+FAIL Property list-style-type value 'symbols(numeric "first" "second")' computes to 'symbols(numeric "first" "second")' assert_true: 'symbols(numeric "first" "second")' is a supported value for list-style-type. expected true got false
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html
new file mode 100644 (file)
index 0000000..21230f3
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Lists: getComputedStyle().listStyleType</title>
+<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-type">
+<meta name="assert" content="list-style-type computed value is as specified.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value('list-style-type', 'none');
+
+test_computed_value('list-style-type', 'disc');
+test_computed_value('list-style-type', 'circle');
+test_computed_value('list-style-type', 'square');
+test_computed_value('list-style-type', 'decimal');
+test_computed_value('list-style-type', 'decimal-leading-zero');
+test_computed_value('list-style-type', 'lower-roman');
+test_computed_value('list-style-type', 'upper-roman');
+test_computed_value('list-style-type', 'lower-greek');
+test_computed_value('list-style-type', 'lower-latin');
+test_computed_value('list-style-type', 'upper-latin');
+test_computed_value('list-style-type', 'armenian');
+test_computed_value('list-style-type', 'georgian');
+test_computed_value('list-style-type', 'lower-alpha');
+test_computed_value('list-style-type', 'upper-alpha');
+
+// <string>
+test_computed_value('list-style-type', '"marker string"');
+test_computed_value('list-style-type', '"Note: "');
+
+// <counter-style> = <counter-style-name> | symbols();
+test_computed_value('list-style-type', 'counter-Style-Name');
+test_computed_value('list-style-type', 'CounterStyleName');
+
+// symbols() = symbols( <symbols-type>? [ <string> | <image> ]+ );
+// <symbols-type> = cyclic | numeric | alphabetic | symbolic | fixed;
+test_computed_value('list-style-type', 'symbols(cyclic "string")');
+test_computed_value('list-style-type', 'symbols(cyclic "○" "●")');
+test_computed_value('list-style-type', 'symbols(fixed "1")');
+test_computed_value('list-style-type', 'symbols("string")');
+test_computed_value('list-style-type', 'symbols(alphabetic "first" "second")');
+test_computed_value('list-style-type', 'symbols(numeric "first" "second")');
+</script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt
new file mode 100644 (file)
index 0000000..0ee3625
--- /dev/null
@@ -0,0 +1,27 @@
+
+PASS e.style['list-style-type'] = "none" should set the property value 
+PASS e.style['list-style-type'] = "disc" should set the property value 
+PASS e.style['list-style-type'] = "circle" should set the property value 
+PASS e.style['list-style-type'] = "square" should set the property value 
+PASS e.style['list-style-type'] = "decimal" should set the property value 
+PASS e.style['list-style-type'] = "decimal-leading-zero" should set the property value 
+PASS e.style['list-style-type'] = "lower-roman" should set the property value 
+PASS e.style['list-style-type'] = "upper-roman" should set the property value 
+PASS e.style['list-style-type'] = "lower-greek" should set the property value 
+PASS e.style['list-style-type'] = "lower-latin" should set the property value 
+PASS e.style['list-style-type'] = "upper-latin" should set the property value 
+PASS e.style['list-style-type'] = "armenian" should set the property value 
+PASS e.style['list-style-type'] = "georgian" should set the property value 
+PASS e.style['list-style-type'] = "lower-alpha" should set the property value 
+PASS e.style['list-style-type'] = "upper-alpha" should set the property value 
+FAIL e.style['list-style-type'] = "\"marker string\"" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "\"Note: \"" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "counter-Style-Name" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "CounterStyleName" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "symbols(cyclic \"string\")" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "symbols(cyclic \"○\" \"●\")" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "symbols(fixed \"1\")" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "symbols(symbolic \"string\")" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "symbols(alphabetic \"first\" \"second\")" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['list-style-type'] = "symbols(numeric \"first\" \"second\")" should set the property value assert_not_equals: property should be set got disallowed value ""
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html
new file mode 100644 (file)
index 0000000..66067ca
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Lists: parsing list-style-type with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-type">
+<link rel="help" href="https://www.w3.org/TR/CSS2/generate.html#propdef-list-style-type">
+<meta name="assert" content="list-style-type supports the full grammar '<counter-style> | <string> | none'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value('list-style-type', 'none');
+
+test_valid_value('list-style-type', 'disc');
+test_valid_value('list-style-type', 'circle');
+test_valid_value('list-style-type', 'square');
+test_valid_value('list-style-type', 'decimal');
+test_valid_value('list-style-type', 'decimal-leading-zero');
+test_valid_value('list-style-type', 'lower-roman');
+test_valid_value('list-style-type', 'upper-roman');
+test_valid_value('list-style-type', 'lower-greek');
+test_valid_value('list-style-type', 'lower-latin');
+test_valid_value('list-style-type', 'upper-latin');
+test_valid_value('list-style-type', 'armenian');
+test_valid_value('list-style-type', 'georgian');
+test_valid_value('list-style-type', 'lower-alpha');
+test_valid_value('list-style-type', 'upper-alpha');
+
+// <string>
+test_valid_value('list-style-type', '"marker string"');
+test_valid_value('list-style-type', '"Note: "');
+
+// <counter-style> = <counter-style-name> | symbols();
+test_valid_value('list-style-type', 'counter-Style-Name');
+test_valid_value('list-style-type', 'CounterStyleName');
+
+// symbols() = symbols( <symbols-type>? [ <string> | <image> ]+ );
+// <symbols-type> = cyclic | numeric | alphabetic | symbolic | fixed;
+test_valid_value('list-style-type', 'symbols(cyclic "string")');
+test_valid_value('list-style-type', 'symbols(cyclic "○" "●")');
+test_valid_value('list-style-type', 'symbols(fixed "1")');
+test_valid_value('list-style-type', 'symbols(symbolic "string")', 'symbols("string")');
+test_valid_value('list-style-type', 'symbols(alphabetic "first" "second")');
+test_valid_value('list-style-type', 'symbols(numeric "first" "second")');
+</script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/w3c-import.log
new file mode 100644 (file)
index 0000000..5f15c7f
--- /dev/null
@@ -0,0 +1,18 @@
+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+       https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html