Title: [291738] trunk/LayoutTests/imported/w3c
Revision
291738
Author
nmouchta...@apple.com
Date
2022-03-23 01:02:37 -0700 (Wed, 23 Mar 2022)

Log Message

Import calc() infinite/nan tests
https://bugs.webkit.org/show_bug.cgi?id=238237

Unreviewed, test import.


* web-platform-tests/css/css-values/calc-catch-divide-by-0-expected.txt: Added.
* web-platform-tests/css/css-values/calc-catch-divide-by-0.html: Added.
* web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle-expected.txt: Added.
* web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle.html: Added.
* web-platform-tests/css/css-values/calc-infinity-nan-serialize-length-expected.txt: Added.
* web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html: Added.
* web-platform-tests/css/css-values/calc-infinity-nan-serialize-time-expected.txt: Added.
* web-platform-tests/css/css-values/calc-infinity-nan-serialize-time.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291737 => 291738)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-23 06:47:41 UTC (rev 291737)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-23 08:02:37 UTC (rev 291738)
@@ -1,3 +1,19 @@
+2022-03-23  Nikolaos Mouchtaris  <nmouchta...@apple.com>
+
+        Import calc() infinite/nan tests
+        https://bugs.webkit.org/show_bug.cgi?id=238237
+
+        Unreviewed, test import.
+
+        * web-platform-tests/css/css-values/calc-catch-divide-by-0-expected.txt: Added.
+        * web-platform-tests/css/css-values/calc-catch-divide-by-0.html: Added.
+        * web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle-expected.txt: Added.
+        * web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle.html: Added.
+        * web-platform-tests/css/css-values/calc-infinity-nan-serialize-length-expected.txt: Added.
+        * web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html: Added.
+        * web-platform-tests/css/css-values/calc-infinity-nan-serialize-time-expected.txt: Added.
+        * web-platform-tests/css/css-values/calc-infinity-nan-serialize-time.html: Added.
+
 2022-03-22  Sihui Liu  <sihui_...@apple.com>
 
         Check if origin can access storage in Storage API

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-catch-divide-by-0-expected.txt (0 => 291738)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-catch-divide-by-0-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-catch-divide-by-0-expected.txt	2022-03-23 08:02:37 UTC (rev 291738)
@@ -0,0 +1,23 @@
+
+FAIL 'calc(100px * 0 / 0)' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(100px / 0)' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(100px / (0))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(100px / (2 - 2))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(100px / (2 - (-62 + 64)))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(100px * (1 / 0))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(100px * (1 / (0)))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(100px * (1 / (2 - 2)))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(100px * (1 / (2 - (-62 + 64))))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(1px * max(1/0, 0))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+PASS 'calc(1px * min(1/0, 0))' as a specified value should serialize as 'calc(0px)'.
+FAIL 'calc(1px * max(0/0, 0))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * min(0/0, 0))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * max(0/0, min(0,10)))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * clamp(0/0, 0, 10))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * max(0, min(10, 0/0)))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * clamp(0, 10, 0/0))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * max(0, min(0/0, 10)))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * clamp(0, 0/0, 10))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * clamp(-1/0, 0, 1/0))' as a specified value should serialize as 'calc(0px)'. assert_equals: 'calc(1px * clamp(-1/0, 0, 1/0))' and 'calc(0px)' should serialize the same in specified values. expected "calc(0px)" but got "calc(1px * clamp(-infinity, 0, infinity))"
+FAIL 'calc(1px * clamp(-1/0, 1/0, 10))' as a specified value should serialize as 'calc(10px)'. assert_equals: 'calc(1px * clamp(-1/0, 1/0, 10))' and 'calc(10px)' should serialize the same in specified values. expected "calc(10px)" but got "calc(1px * clamp(-infinity, infinity, 10))"
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-catch-divide-by-0.html (0 => 291738)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-catch-divide-by-0.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-catch-divide-by-0.html	2022-03-23 08:02:37 UTC (rev 291738)
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<title>Zero Division: calc() serialization.</title>
+<link rel="author" title="Seokho Song"  href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script src=""
+<div id="target"></div>
+<div id="log"></div>
+<script>
+function test_serialization(t,s, {prop="width"}={}) {
+    test_specified_serialization(prop, t, s)
+}
+
+    //TEST CASE                       |EXPECTED
+var test_map = {
+    "100px * 0 / 0"                   :"calc(NaN * 1px)",
+    "100px / 0"                       :"calc(infinity * 1px)",
+    "100px / (0)"                     :"calc(infinity * 1px)",
+    "100px / (2 - 2)"                 :"calc(infinity * 1px)",
+    "100px / (2 - (-62 + 64))"        :"calc(infinity * 1px)",
+    "100px * (1 / 0)"                 :"calc(infinity * 1px)",
+    "100px * (1 / (0))"               :"calc(infinity * 1px)",
+    "100px * (1 / (2 - 2))"           :"calc(infinity * 1px)",
+    "100px * (1 / (2 - (-62 + 64)))"  :"calc(infinity * 1px)",
+    "1px * max(1/0, 0)"               :"calc(infinity * 1px)",
+    "1px * min(1/0, 0)"               :"calc(0px)",
+    "1px * max(0/0, 0)"               :"calc(NaN * 1px)",
+    "1px * min(0/0, 0)"               :"calc(NaN * 1px)",
+
+    "1px * max(0/0, min(0,10))"       :"calc(NaN * 1px)",
+    "1px * clamp(0/0, 0, 10)"         :"calc(NaN * 1px)",
+
+    "1px * max(0, min(10, 0/0))"      :"calc(NaN * 1px)",
+    "1px * clamp(0, 10, 0/0)"         :"calc(NaN * 1px)",
+
+    "1px * max(0, min(0/0, 10))"      :"calc(NaN * 1px)",
+    "1px * clamp(0, 0/0, 10)"         :"calc(NaN * 1px)",
+
+    "1px * clamp(-1/0, 0, 1/0)"       :"calc(0px)",
+    "1px * clamp(-1/0, 1/0, 10)"      :"calc(10px)",
+};
+for (var exp in test_map) {
+    test_serialization("calc("+exp+")", test_map[exp])
+}
+
+</script>
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle-expected.txt (0 => 291738)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle-expected.txt	2022-03-23 08:02:37 UTC (rev 291738)
@@ -0,0 +1,32 @@
+
+FAIL 'rotate(calc(1deg * NaN))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1rad * NaN))' as a specified value should serialize as 'rotate(calc(NaN * 1rad))'. assert_equals: 'rotate(calc(NaN * 1rad))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1rad))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1turn * NaN))' as a specified value should serialize as 'rotate(calc(NaN * 1turn))'. assert_equals: 'rotate(calc(NaN * 1turn))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1turn))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1grad * nan))' as a specified value should serialize as 'rotate(calc(NaN * 1grad))'. assert_equals: 'rotate(calc(NaN * 1grad))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1grad))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * infinity / infinity))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * 0 * infinity))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * (infinity + -infinity)))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * (-infinity + infinity)))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * (infinity - infinity)))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * infinity))' as a specified value should serialize as 'rotate(calc(infinity * 1deg))'. assert_equals: 'rotate(calc(infinity * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(infinity * 1deg))" but got "rotate(calc(infinitydeg))"
+FAIL 'rotate(calc(1deg * -infinity))' as a specified value should serialize as 'rotate(calc(-infinity * 1deg))'. assert_equals: 'rotate(calc(-infinity * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(-infinity * 1deg))" but got "rotate(calc(-infinitydeg))"
+FAIL 'rotate(calc(1deg * iNFinIty))' as a specified value should serialize as 'rotate(calc(infinity * 1deg))'. assert_equals: 'rotate(calc(infinity * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(infinity * 1deg))" but got "rotate(calc(infinitydeg))"
+FAIL 'rotate(calc(1deg * (infinity + infinity)))' as a specified value should serialize as 'rotate(calc(infinity * 1deg))'. assert_equals: 'rotate(calc(infinity * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(infinity * 1deg))" but got "rotate(calc(infinitydeg))"
+FAIL 'rotate(calc(1deg * (-infinity + -infinity)))' as a specified value should serialize as 'rotate(calc(-infinity * 1deg))'. assert_equals: 'rotate(calc(-infinity * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(-infinity * 1deg))" but got "rotate(calc(-infinitydeg))"
+PASS 'rotate(calc(1deg * 1/infinity))' as a specified value should serialize as 'rotate(calc(0deg))'.
+FAIL 'rotate(calc(1deg * infinity * infinity))' as a specified value should serialize as 'rotate(calc(infinity * 1deg))'. assert_equals: 'rotate(calc(infinity * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(infinity * 1deg))" but got "rotate(calc(infinitydeg))"
+FAIL 'rotate(calc(1deg * -infinity * -infinity))' as a specified value should serialize as 'rotate(calc(infinity * 1deg))'. assert_equals: 'rotate(calc(infinity * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(infinity * 1deg))" but got "rotate(calc(infinitydeg))"
+FAIL 'rotate(calc(1 * max(INFinity*3deg, 0deg)))' as a specified value should serialize as 'rotate(calc(infinity * 1deg))'. assert_equals: 'rotate(calc(infinity * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(infinity * 1deg))" but got "rotate(calc(infinitydeg))"
+PASS 'rotate(calc(1 * min(inFInity*4deg, 0deg)))' as a specified value should serialize as 'rotate(calc(0deg))'.
+FAIL 'rotate(calc(1 * max(nAn*2deg, 0deg)))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1 * min(nan*3deg, 0deg)))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1 * clamp(-INFINITY*20deg, 0deg, infiniTY*10deg)))' as a specified value should serialize as 'rotate(calc(0deg))'. assert_equals: 'rotate(calc(1 * clamp(-INFINITY*20deg, 0deg, infiniTY*10deg)))' and 'rotate(calc(0deg))' should serialize the same in specified values. expected "rotate(calc(0deg))" but got "rotate(calc(1 * clamp(-infinitydeg, 0deg, infinitydeg)))"
+FAIL 'rotate(calc(1deg * max(NaN, min(0,10))))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * clamp(NaN, 0, 10)))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * max(0, min(10, NaN))))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * clamp(0, 10, NaN)))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * max(0, min(NaN, 10))))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * clamp(0, NaN, 10)))' as a specified value should serialize as 'rotate(calc(NaN * 1deg))'. assert_equals: 'rotate(calc(NaN * 1deg))' should round-trip exactly in specified values. expected "rotate(calc(NaN * 1deg))" but got "rotate(calc(NaNdeg))"
+FAIL 'rotate(calc(1deg * clamp(-Infinity, 0, infinity)))' as a specified value should serialize as 'rotate(calc(0deg))'. assert_equals: 'rotate(calc(1deg * clamp(-Infinity, 0, infinity)))' and 'rotate(calc(0deg))' should serialize the same in specified values. expected "rotate(calc(0deg))" but got "rotate(calc(1deg * clamp(-infinity, 0, infinity)))"
+FAIL 'rotate(calc(1deg * clamp(-inFinity, infinity, 10)))' as a specified value should serialize as 'rotate(calc(10deg))'. assert_equals: 'rotate(calc(1deg * clamp(-inFinity, infinity, 10)))' and 'rotate(calc(10deg))' should serialize the same in specified values. expected "rotate(calc(10deg))" but got "rotate(calc(1deg * clamp(-infinity, infinity, 10)))"
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle.html (0 => 291738)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle.html	2022-03-23 08:02:37 UTC (rev 291738)
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML>
+<title>Infinity and NaN: calc() serialization for length values.</title>
+<link rel="author" title="Seokho Song"  href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script src=""
+<div id="target"></div>
+<div id="log"></div>
+<script>
+function test_serialization(t,s, {prop="transform"}={}) {
+    test_specified_serialization(prop, t, s)
+}
+//TEST CASE                                            | EXPECTED
+var test_map = {
+    "1deg * NaN"                                       :"calc(NaN * 1deg)",
+    "1rad * NaN"                                       :"calc(NaN * 1rad)",
+    "1turn * NaN"                                      :"calc(NaN * 1turn)",
+    "1grad * nan"                                      :"calc(NaN * 1grad)",
+    "1deg * infinity / infinity"                       :"calc(NaN * 1deg)",
+    "1deg * 0 * infinity"                              :"calc(NaN * 1deg)",
+    "1deg * (infinity + -infinity)"                    :"calc(NaN * 1deg)",
+    "1deg * (-infinity + infinity)"                    :"calc(NaN * 1deg)",
+    "1deg * (infinity - infinity)"                     :"calc(NaN * 1deg)",
+    "1deg * infinity"                                  :"calc(infinity * 1deg)",
+    "1deg * -infinity"                                 :"calc(-infinity * 1deg)",
+    "1deg * iNFinIty"                                  :"calc(infinity * 1deg)",
+    "1deg * (infinity + infinity)"                     :"calc(infinity * 1deg)",
+    "1deg * (-infinity + -infinity)"                   :"calc(-infinity * 1deg)",
+    "1deg * 1/infinity"                                :"calc(0deg)",
+    "1deg * infinity * infinity"                       :"calc(infinity * 1deg)",
+    "1deg * -infinity * -infinity"                     :"calc(infinity * 1deg)",
+    "1 * max(INFinity*3deg, 0deg)"                     :"calc(infinity * 1deg)",
+    "1 * min(inFInity*4deg, 0deg)"                     :"calc(0deg)",
+    "1 * max(nAn*2deg, 0deg)"                          :"calc(NaN * 1deg)",
+    "1 * min(nan*3deg, 0deg)"                          :"calc(NaN * 1deg)",
+    "1 * clamp(-INFINITY*20deg, 0deg, infiniTY*10deg)" :"calc(0deg)",
+
+    "1deg * max(NaN, min(0,10))"                       :"calc(NaN * 1deg)",
+    "1deg * clamp(NaN, 0, 10)"                         :"calc(NaN * 1deg)",
+
+    "1deg * max(0, min(10, NaN))"                      :"calc(NaN * 1deg)",
+    "1deg * clamp(0, 10, NaN)"                         :"calc(NaN * 1deg)",
+
+    "1deg * max(0, min(NaN, 10))"                      :"calc(NaN * 1deg)",
+    "1deg * clamp(0, NaN, 10)"                         :"calc(NaN * 1deg)",
+
+    "1deg * clamp(-Infinity, 0, infinity)"             :"calc(0deg)",
+    "1deg * clamp(-inFinity, infinity, 10)"            :"calc(10deg)",
+};
+
+for (var exp in test_map) {
+    test_serialization("rotate(calc("+exp+"))", "rotate("+test_map[exp]+")");
+}
+</script>
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length-expected.txt (0 => 291738)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length-expected.txt	2022-03-23 08:02:37 UTC (rev 291738)
@@ -0,0 +1,30 @@
+
+FAIL 'calc(1px * NaN)' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * nan)' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * infinity / infinity)' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * 0 * infinity)' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * (infinity + -infinity))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * (-infinity + infinity))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * (infinity - infinity))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * infinity)' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(1px * -infinity)' as a specified value should serialize as 'calc(-infinity * 1px)'. assert_equals: 'calc(-infinity * 1px)' should round-trip exactly in specified values. expected "calc(-infinity * 1px)" but got "calc(-infinitypx)"
+FAIL 'calc(1px * iNFinIty)' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(1px * (infinity + infinity))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(1px * (-infinity + -infinity))' as a specified value should serialize as 'calc(-infinity * 1px)'. assert_equals: 'calc(-infinity * 1px)' should round-trip exactly in specified values. expected "calc(-infinity * 1px)" but got "calc(-infinitypx)"
+PASS 'calc(1px * 1/infinity)' as a specified value should serialize as 'calc(0px)'.
+FAIL 'calc(1px * infinity * infinity)' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(1px * -infinity * -infinity)' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+FAIL 'calc(1 * max(INFinity*3px, 0px))' as a specified value should serialize as 'calc(infinity * 1px)'. assert_equals: 'calc(infinity * 1px)' should round-trip exactly in specified values. expected "calc(infinity * 1px)" but got "calc(infinitypx)"
+PASS 'calc(1 * min(inFInity*4px, 0px))' as a specified value should serialize as 'calc(0px)'.
+FAIL 'calc(1 * max(nAn*2px, 0px))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1 * min(nan*3px, 0px))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1 * clamp(-INFINITY*20px, 0px, infiniTY*10px))' as a specified value should serialize as 'calc(0px)'. assert_equals: 'calc(1 * clamp(-INFINITY*20px, 0px, infiniTY*10px))' and 'calc(0px)' should serialize the same in specified values. expected "calc(0px)" but got "calc(1 * clamp(-infinitypx, 0px, infinitypx))"
+FAIL 'calc(1px * max(NaN, min(0,10)))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * clamp(NaN, 0, 10))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * max(0, min(10, NaN)))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * clamp(0, 10, NaN))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * max(0, min(NaN, 10)))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * clamp(0, NaN, 10))' as a specified value should serialize as 'calc(NaN * 1px)'. assert_equals: 'calc(NaN * 1px)' should round-trip exactly in specified values. expected "calc(NaN * 1px)" but got "calc(NaNpx)"
+FAIL 'calc(1px * clamp(-Infinity, 0, infinity))' as a specified value should serialize as 'calc(0px)'. assert_equals: 'calc(1px * clamp(-Infinity, 0, infinity))' and 'calc(0px)' should serialize the same in specified values. expected "calc(0px)" but got "calc(1px * clamp(-infinity, 0, infinity))"
+FAIL 'calc(1px * clamp(-inFinity, infinity, 10))' as a specified value should serialize as 'calc(10px)'. assert_equals: 'calc(1px * clamp(-inFinity, infinity, 10))' and 'calc(10px)' should serialize the same in specified values. expected "calc(10px)" but got "calc(1px * clamp(-infinity, infinity, 10))"
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html (0 => 291738)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html	2022-03-23 08:02:37 UTC (rev 291738)
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML>
+<title>Infinity and NaN: calc() serialization for length values.</title>
+<link rel="author" title="Seokho Song"  href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script src=""
+<div id="target"></div>
+<div id="log"></div>
+<script>
+function test_serialization(t,s, {prop="width"}={}) {
+    test_specified_serialization(prop, t, s)
+}
+//TEST CASE                                          | EXPECTED
+var test_map = {
+    "1px * NaN"                                     :"calc(NaN * 1px)",
+    "1px * nan"                                     :"calc(NaN * 1px)",
+    "1px * infinity / infinity"                     :"calc(NaN * 1px)",
+    "1px * 0 * infinity"                            :"calc(NaN * 1px)",
+    "1px * (infinity + -infinity)"                  :"calc(NaN * 1px)",
+    "1px * (-infinity + infinity)"                  :"calc(NaN * 1px)",
+    "1px * (infinity - infinity)"                   :"calc(NaN * 1px)",
+    "1px * infinity"                                :"calc(infinity * 1px)",
+    "1px * -infinity"                               :"calc(-infinity * 1px)",
+    "1px * iNFinIty"                                :"calc(infinity * 1px)",
+    "1px * (infinity + infinity)"                   :"calc(infinity * 1px)",
+    "1px * (-infinity + -infinity)"                 :"calc(-infinity * 1px)",
+    "1px * 1/infinity"                              :"calc(0px)",
+    "1px * infinity * infinity"                     :"calc(infinity * 1px)",
+    "1px * -infinity * -infinity"                   :"calc(infinity * 1px)",
+    "1 * max(INFinity*3px, 0px)"                    :"calc(infinity * 1px)",
+    "1 * min(inFInity*4px, 0px)"                    :"calc(0px)",
+    "1 * max(nAn*2px, 0px)"                         :"calc(NaN * 1px)",
+    "1 * min(nan*3px, 0px)"                         :"calc(NaN * 1px)",
+    "1 * clamp(-INFINITY*20px, 0px, infiniTY*10px)" :"calc(0px)",
+
+    "1px * max(NaN, min(0,10))"                     :"calc(NaN * 1px)",
+    "1px * clamp(NaN, 0, 10)"                       :"calc(NaN * 1px)",
+
+    "1px * max(0, min(10, NaN))"                    :"calc(NaN * 1px)",
+    "1px * clamp(0, 10, NaN)"                       :"calc(NaN * 1px)",
+
+    "1px * max(0, min(NaN, 10))"                    :"calc(NaN * 1px)",
+    "1px * clamp(0, NaN, 10)"                       :"calc(NaN * 1px)",
+
+    "1px * clamp(-Infinity, 0, infinity)"           :"calc(0px)",
+    "1px * clamp(-inFinity, infinity, 10)"          :"calc(10px)",
+};
+
+for (var exp in test_map) {
+    test_serialization("calc("+exp+")", test_map[exp]);
+}
+</script>
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-time-expected.txt (0 => 291738)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-time-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-time-expected.txt	2022-03-23 08:02:37 UTC (rev 291738)
@@ -0,0 +1,30 @@
+
+FAIL 'calc(1s * NaN)' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * nan)' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * infinity / infinity)' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * 0 * infinity)' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * (infinity + -infinity))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * (-infinity + infinity))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * (infinity - infinity))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * infinity)' as a specified value should serialize as 'calc(infinity * 1s)'. assert_equals: 'calc(infinity * 1s)' should round-trip exactly in specified values. expected "calc(infinity * 1s)" but got "calc(infinitys)"
+FAIL 'calc(1s * -infinity)' as a specified value should serialize as 'calc(-infinity * 1s)'. assert_equals: 'calc(-infinity * 1s)' should round-trip exactly in specified values. expected "calc(-infinity * 1s)" but got "calc(-infinitys)"
+FAIL 'calc(1s * iNFinIty)' as a specified value should serialize as 'calc(infinity * 1s)'. assert_equals: 'calc(infinity * 1s)' should round-trip exactly in specified values. expected "calc(infinity * 1s)" but got "calc(infinitys)"
+FAIL 'calc(1s * (infinity + infinity))' as a specified value should serialize as 'calc(infinity * 1s)'. assert_equals: 'calc(infinity * 1s)' should round-trip exactly in specified values. expected "calc(infinity * 1s)" but got "calc(infinitys)"
+FAIL 'calc(1s * (-infinity + -infinity))' as a specified value should serialize as 'calc(-infinity * 1s)'. assert_equals: 'calc(-infinity * 1s)' should round-trip exactly in specified values. expected "calc(-infinity * 1s)" but got "calc(-infinitys)"
+PASS 'calc(1s * 1/infinity)' as a specified value should serialize as 'calc(0s)'.
+FAIL 'calc(1s * infinity * infinity)' as a specified value should serialize as 'calc(infinity * 1s)'. assert_equals: 'calc(infinity * 1s)' should round-trip exactly in specified values. expected "calc(infinity * 1s)" but got "calc(infinitys)"
+FAIL 'calc(1s * -infinity * -infinity)' as a specified value should serialize as 'calc(infinity * 1s)'. assert_equals: 'calc(infinity * 1s)' should round-trip exactly in specified values. expected "calc(infinity * 1s)" but got "calc(infinitys)"
+FAIL 'calc(1 * max(INFinity*3s, 0s))' as a specified value should serialize as 'calc(infinity * 1s)'. assert_equals: 'calc(infinity * 1s)' should round-trip exactly in specified values. expected "calc(infinity * 1s)" but got "calc(infinitys)"
+PASS 'calc(1 * min(inFInity*4s, 0s))' as a specified value should serialize as 'calc(0s)'.
+FAIL 'calc(1 * max(nAn*2s, 0s))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1 * min(nan*3s, 0s))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1 * clamp(-INFINITY*20s, 0s, infiniTY*10s))' as a specified value should serialize as 'calc(0s)'. assert_equals: 'calc(1 * clamp(-INFINITY*20s, 0s, infiniTY*10s))' and 'calc(0s)' should serialize the same in specified values. expected "calc(0s)" but got "calc(1 * clamp(-infinitys, 0s, infinitys))"
+FAIL 'calc(1s * max(NaN, min(0,10)))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * clamp(NaN, 0, 10))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * max(0, min(10, NaN)))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * clamp(0, 10, NaN))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * max(0, min(NaN, 10)))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * clamp(0, NaN, 10))' as a specified value should serialize as 'calc(NaN * 1s)'. assert_equals: 'calc(NaN * 1s)' should round-trip exactly in specified values. expected "calc(NaN * 1s)" but got "calc(NaNs)"
+FAIL 'calc(1s * clamp(-Infinity, 0, infinity))' as a specified value should serialize as 'calc(0s)'. assert_equals: 'calc(1s * clamp(-Infinity, 0, infinity))' and 'calc(0s)' should serialize the same in specified values. expected "calc(0s)" but got "calc(1s * clamp(-infinity, 0, infinity))"
+FAIL 'calc(1s * clamp(-inFinity, infinity, 10))' as a specified value should serialize as 'calc(10s)'. assert_equals: 'calc(1s * clamp(-inFinity, infinity, 10))' and 'calc(10s)' should serialize the same in specified values. expected "calc(10s)" but got "calc(1s * clamp(-infinity, infinity, 10))"
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-time.html (0 => 291738)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-time.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-time.html	2022-03-23 08:02:37 UTC (rev 291738)
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML>
+<title>Infinity and NaN: calc() serialization for time values.</title>
+<link rel="author" title="Seokho Song"  href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script src=""
+<div id="target"></div>
+<div id="log"></div>
+<script>
+function test_serialization(t,s, {prop="animationDuration"}={}) {
+    test_specified_serialization(prop, t, s)
+}
+//TEST CASE                                          | EXPECTED
+var test_map = {
+    "1s * NaN"                                     :"calc(NaN * 1s)",
+    "1s * nan"                                     :"calc(NaN * 1s)",
+    "1s * infinity / infinity"                     :"calc(NaN * 1s)",
+    "1s * 0 * infinity"                            :"calc(NaN * 1s)",
+    "1s * (infinity + -infinity)"                  :"calc(NaN * 1s)",
+    "1s * (-infinity + infinity)"                  :"calc(NaN * 1s)",
+    "1s * (infinity - infinity)"                   :"calc(NaN * 1s)",
+    "1s * infinity"                                :"calc(infinity * 1s)",
+    "1s * -infinity"                               :"calc(-infinity * 1s)",
+    "1s * iNFinIty"                                :"calc(infinity * 1s)",
+    "1s * (infinity + infinity)"                   :"calc(infinity * 1s)",
+    "1s * (-infinity + -infinity)"                 :"calc(-infinity * 1s)",
+    "1s * 1/infinity"                              :"calc(0s)",
+    "1s * infinity * infinity"                     :"calc(infinity * 1s)",
+    "1s * -infinity * -infinity"                   :"calc(infinity * 1s)",
+    "1 * max(INFinity*3s, 0s)"                     :"calc(infinity * 1s)",
+    "1 * min(inFInity*4s, 0s)"                     :"calc(0s)",
+    "1 * max(nAn*2s, 0s)"                          :"calc(NaN * 1s)",
+    "1 * min(nan*3s, 0s)"                          :"calc(NaN * 1s)",
+    "1 * clamp(-INFINITY*20s, 0s, infiniTY*10s)"   :"calc(0s)",
+
+    "1s * max(NaN, min(0,10))"                     :"calc(NaN * 1s)",
+    "1s * clamp(NaN, 0, 10)"                       :"calc(NaN * 1s)",
+
+    "1s * max(0, min(10, NaN))"                    :"calc(NaN * 1s)",
+    "1s * clamp(0, 10, NaN)"                       :"calc(NaN * 1s)",
+
+    "1s * max(0, min(NaN, 10))"                    :"calc(NaN * 1s)",
+    "1s * clamp(0, NaN, 10)"                       :"calc(NaN * 1s)",
+
+    "1s * clamp(-Infinity, 0, infinity)"           :"calc(0s)",
+    "1s * clamp(-inFinity, infinity, 10)"          :"calc(10s)",
+};
+
+for (var exp in test_map) {
+    test_serialization("calc("+exp+")", test_map[exp]);
+}
+</script>
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to