Truly independent web browser
Tests/LibWeb: Import some SVG DOM WPT tests
Andreas Kling4d796cb3e221
diff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/coordinate-systems/SVGTransformList.list-01.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/coordinate-systems/SVGTransformList.list-01.txtnew file mode 100644index 00000000000..79d051bd985--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/coordinate-systems/SVGTransformList.list-01.txt@@ -0,0 +1,20 @@+Harness status: OK++Found 14 tests++6 Pass+8 Fail+Fail SVGTransformList interface, animVal distinct from baseVal+Pass SVGTransformList interface, animVal is read-only+Fail SVGTransformList interface, legacy getters / list length+Pass SVGTransformList interface, initialize() invalid arguments+Fail SVGTransformList interface, getItem() arguments+Pass SVGTransformList interface, insertItemBefore() invalid arguments+Fail SVGTransformList interface, insertItemBefore()+Pass SVGTransformList interface, replaceItem() invalid arguments+Pass SVGTransformList interface, indexed setter+Fail SVGTransformList interface, replaceItem()+Fail SVGTransformList interface, removeItem()+Pass SVGTransformList interface, appendItem() invalid arguments+Fail SVGTransformList interface, appendItem()+Fail SVGTransformList interface, clear()\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter-setter.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter-setter.txtnew file mode 100644index 00000000000..48d01c5e163--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter-setter.txt@@ -0,0 +1,51 @@+Harness status: OK++Found 45 tests++3 Pass+42 Fail+Fail SVGAElement mutation [Mode: href] (0): hash+Fail SVGAElement mutation [Mode: href] (1): hash+Fail SVGAElement mutation [Mode: href] (2): host+Fail SVGAElement mutation [Mode: href] (3): hostname+Pass SVGAElement mutation [Mode: href] (4): href+Fail SVGAElement mutation [Mode: href] (5): password+Fail SVGAElement mutation [Mode: href] (6): pathname+Fail SVGAElement mutation [Mode: href] (7): port+Fail SVGAElement mutation [Mode: href] (8): protocol+Fail SVGAElement mutation [Mode: href] (9): protocol+Fail SVGAElement mutation [Mode: href] (10): search+Fail SVGAElement mutation [Mode: href] (11): search+Fail SVGAElement mutation [Mode: href] (12): search+Fail SVGAElement mutation [Mode: href] (13): search+Fail SVGAElement mutation [Mode: href] (14): username+Fail SVGAElement mutation [Mode: xlink] (0): hash+Fail SVGAElement mutation [Mode: xlink] (1): hash+Fail SVGAElement mutation [Mode: xlink] (2): host+Fail SVGAElement mutation [Mode: xlink] (3): hostname+Pass SVGAElement mutation [Mode: xlink] (4): href+Fail SVGAElement mutation [Mode: xlink] (5): password+Fail SVGAElement mutation [Mode: xlink] (6): pathname+Fail SVGAElement mutation [Mode: xlink] (7): port+Fail SVGAElement mutation [Mode: xlink] (8): protocol+Fail SVGAElement mutation [Mode: xlink] (9): protocol+Fail SVGAElement mutation [Mode: xlink] (10): search+Fail SVGAElement mutation [Mode: xlink] (11): search+Fail SVGAElement mutation [Mode: xlink] (12): search+Fail SVGAElement mutation [Mode: xlink] (13): search+Fail SVGAElement mutation [Mode: xlink] (14): username+Fail SVGAElement mutation [Mode: both] (0): hash+Fail SVGAElement mutation [Mode: both] (1): hash+Fail SVGAElement mutation [Mode: both] (2): host+Fail SVGAElement mutation [Mode: both] (3): hostname+Pass SVGAElement mutation [Mode: both] (4): href+Fail SVGAElement mutation [Mode: both] (5): password+Fail SVGAElement mutation [Mode: both] (6): pathname+Fail SVGAElement mutation [Mode: both] (7): port+Fail SVGAElement mutation [Mode: both] (8): protocol+Fail SVGAElement mutation [Mode: both] (9): protocol+Fail SVGAElement mutation [Mode: both] (10): search+Fail SVGAElement mutation [Mode: both] (11): search+Fail SVGAElement mutation [Mode: both] (12): search+Fail SVGAElement mutation [Mode: both] (13): search+Fail SVGAElement mutation [Mode: both] (14): username\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter.txtnew file mode 100644index 00000000000..348aed5359c--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter.txt@@ -0,0 +1,35 @@+Harness status: OK++Found 30 tests++30 Fail+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (0): origin+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (1): protocol+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (2): username+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (3): password+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (4): host+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (5): hostname+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (6): port+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (7): pathname+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (8): search+Fail SVGAElement HyperlinkElementUtils getter [Mode: href] (9): hash+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (0): origin+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (1): protocol+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (2): username+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (3): password+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (4): host+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (5): hostname+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (6): port+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (7): pathname+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (8): search+Fail SVGAElement HyperlinkElementUtils getter [Mode: xlink] (9): hash+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (0): origin+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (1): protocol+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (2): username+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (3): password+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (4): host+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (5): hostname+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (6): port+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (7): pathname+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (8): search+Fail SVGAElement HyperlinkElementUtils getter [Mode: both] (9): hash\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/painting/animations/stroke-dasharray-composition.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/painting/animations/stroke-dasharray-composition.txtnew file mode 100644index 00000000000..578fed7a1e7--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/painting/animations/stroke-dasharray-composition.txt@@ -0,0 +1,142 @@+Harness status: OK++Found 136 tests++84 Pass+52 Fail+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (-0.6) should be [ 0 0]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (-0.4) should be [ 0 1]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (-0.2) should be [ 0 3]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0) should be [ 0 5]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0.2) should be [ 2 7]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0.4) should be [ 4 9]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0.6) should be [ 6 11]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0.8) should be [ 8 13]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (1) should be [10 15]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (1.2) should be [12 17]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (-0.6) should be [ 0 0]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (-0.4) should be [ 0 1]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (-0.2) should be [ 0 3]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0) should be [ 0 5]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0.2) should be [ 2 7]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0.4) should be [ 4 9]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0.6) should be [ 6 11]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (0.8) should be [ 8 13]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (1) should be [10 15]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5 5] from add [0 5] to add [10 15] at (1.2) should be [12 17]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (-0.6) should be [5 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (-0.4) should be [5 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (-0.2) should be [5 10]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0) should be [5 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0.2) should be [5 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0.4) should be [5 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0.6) should be [5 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0.8) should be [5 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (1) should be [5 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (1.2) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (-0.6) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (-0.4) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (-0.2) should be [5 10]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0.2) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0.4) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0.6) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (0.8) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (1) should be [5 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 10] from replace [5 10] to add [5 10] at (1.2) should be [5 10]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (-1.5) should be [none]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (-0.5) should be [none]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (0) should be [none]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (0.4) should be [none]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (0.5) should be [10 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (0.6) should be [10 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (1) should be [10 10]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (1.5) should be [10 10]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (-1.5) should be [none]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (-0.5) should be [none]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (0) should be [none]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (0.4) should be [none]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (0.5) should be [10 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (0.6) should be [10 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (1) should be [10 10]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from add [none] to add [10 10] at (1.5) should be [10 10]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (-0.2) should be [3 2 1]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0) should be [5 5 5]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0.2) should be [7 8 9]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0.4) should be [9 11 13]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0.6) should be [11 14 17]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0.8) should be [13 17 21]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (1) should be [15 20 25]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (1.2) should be [17 23 29]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (-0.2) should be [3 2 1]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0) should be [5 5 5]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0.2) should be [7 8 9]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0.4) should be [9 11 13]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0.6) should be [11 14 17]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (0.8) should be [13 17 21]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (1) should be [15 20 25]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [0 5] from add [5] to replace [15 20 25] at (1.2) should be [17 23 29]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (-0.2) should be [ 3 12 13 22 0 8 15 24 1 10 11 20]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0) should be [ 5 10 15 20 5 10 15 20 5 10 15 20]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0.2) should be [ 7 8 17 18 11 12 15 16 9 10 19 20]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0.4) should be [ 9 6 19 16 17 14 15 12 13 10 23 20]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0.6) should be [11 4 21 14 23 16 15 8 17 10 27 20]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0.8) should be [13 2 23 12 29 18 15 4 21 10 31 20]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (1) should be [15 0 25 10 35 20 15 0 25 10 35 20]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (1.2) should be [17 0 27 8 41 22 15 0 29 10 39 20]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (-0.2) should be [ 3 12 13 22 0 8 15 24 1 10 11 20]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0) should be [ 5 10 15 20 5 10 15 20 5 10 15 20]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0.2) should be [ 7 8 17 18 11 12 15 16 9 10 19 20]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0.4) should be [ 9 6 19 16 17 14 15 12 13 10 23 20]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0.6) should be [11 4 21 14 23 16 15 8 17 10 27 20]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (0.8) should be [13 2 23 12 29 18 15 4 21 10 31 20]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (1) should be [15 0 25 10 35 20 15 0 25 10 35 20]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [10 30] from replace [5 10 15 20] to add [15 0 25 10 35 20] at (1.2) should be [17 0 27 8 41 22 15 0 29 10 39 20]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (-0.2) should be [ 4 11 14 3 10 17 2 9 16 5 8 15]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0) should be [ 5 10 15 5 10 15 5 10 15 5 10 15]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0.2) should be [ 6 9 16 7 10 13 8 11 14 5 12 15]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0.4) should be [ 7 8 17 9 10 11 11 12 13 5 14 15]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0.6) should be [ 8 7 18 11 10 9 14 13 12 5 16 15]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0.8) should be [ 9 6 19 13 10 7 17 14 11 5 18 15]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (1) should be [10 5 20 15 10 5 20 15 10 5 20 15]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (1.2) should be [11 4 21 17 10 3 23 16 9 5 22 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (-0.2) should be [ 4 11 14 3 10 17 2 9 16 5 8 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0) should be [ 5 10 15 5 10 15 5 10 15 5 10 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0.2) should be [ 6 9 16 7 10 13 8 11 14 5 12 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0.4) should be [ 7 8 17 9 10 11 11 12 13 5 14 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0.6) should be [ 8 7 18 11 10 9 14 13 12 5 16 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (0.8) should be [ 9 6 19 13 10 7 17 14 11 5 18 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (1) should be [10 5 20 15 10 5 20 15 10 5 20 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [10 20] from replace [5 10 15] to add [10 5 20 15] at (1.2) should be [11 4 21 17 10 3 23 16 9 5 22 15]+Fail Compositing CSS Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (-0.2) should be [ 0 2 7 0 0 9 0 1 6 0 3 8 0 0 5]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0) should be [ 0 5 10 0 5 10 0 5 10 0 5 10 0 5 10]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0.2) should be [ 3 8 13 6 11 11 4 9 14 7 7 12 5 10 15]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0.4) should be [ 6 11 16 12 17 12 8 13 18 14 9 14 10 15 20]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0.6) should be [ 9 14 19 18 23 13 12 17 22 21 11 16 15 20 25]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0.8) should be [12 17 22 24 29 14 16 21 26 28 13 18 20 25 30]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (1) should be [15 20 25 30 35 15 20 25 30 35 15 20 25 30 35]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (1.2) should be [18 23 28 36 41 16 24 29 34 42 17 22 30 35 40]+Fail Compositing Web Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (-0.2) should be [ 0 2 7 0 0 9 0 1 6 0 3 8 0 0 5]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0) should be [ 0 5 10 0 5 10 0 5 10 0 5 10 0 5 10]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0.2) should be [ 3 8 13 6 11 11 4 9 14 7 7 12 5 10 15]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0.4) should be [ 6 11 16 12 17 12 8 13 18 14 9 14 10 15 20]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0.6) should be [ 9 14 19 18 23 13 12 17 22 21 11 16 15 20 25]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (0.8) should be [12 17 22 24 29 14 16 21 26 28 13 18 20 25 30]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (1) should be [15 20 25 30 35 15 20 25 30 35 15 20 25 30 35]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [5] from add [0 5 10] to add [15 20 25 30 35] at (1.2) should be [18 23 28 36 41 16 24 29 34 42 17 22 30 35 40]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (-0.2) should be [7em 12px]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0) should be [9em 14px]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0.2) should be [11em 16px]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0.4) should be [13em 18px]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0.6) should be [15em 20px]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0.8) should be [17em 22px]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (1) should be [19em 24px]+Pass Compositing CSS Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (1.2) should be [21em 26px]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (-0.2) should be [7em 12px]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0) should be [9em 14px]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0.2) should be [11em 16px]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0.4) should be [13em 18px]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0.6) should be [15em 20px]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (0.8) should be [17em 22px]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (1) should be [19em 24px]+Pass Compositing Web Animations: property <stroke-dasharray> underlying [1em] from add [9em 14px] to add [304px 1.5em] at (1.2) should be [21em 26px]\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-matching.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-matching.txtnew file mode 100644index 00000000000..f2cf61301fe--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-matching.txt@@ -0,0 +1,20 @@+Harness status: OK++Found 14 tests++8 Pass+6 Fail+Pass Exact match with navigator.language renders the element+Pass Case-insensitive exact match renders the element+Fail Non-matching language tag does not render+Fail Empty systemLanguage evaluates to false+Pass Absent systemLanguage evaluates to true+Pass Comma-separated list with matching tag first renders+Pass Comma-separated list with matching tag second renders+Pass Comma-separated list with matching tag in the middle renders+Fail Comma-separated list with no matching tag does not render+Pass BCP 47 prefix matching: user language prefix matches listed tag with extra subtag+Pass switch element: first matching child renders, others do not+Fail switch element: skips non-matching, renders first match+Fail switch element: fallback child without systemLanguage renders when no match+Fail switch element: nothing renders when no child matches and no fallback\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-parsing.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-parsing.txtnew file mode 100644index 00000000000..cbe952609d1--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-parsing.txt@@ -0,0 +1,18 @@+Harness status: OK++Found 13 tests++13 Fail+Fail Comma-separated tokens are split into individual items+Fail Whitespace after comma is stripped+Fail Whitespace before comma is stripped+Fail Whitespace around commas is stripped+Fail Leading and trailing whitespace on the value is stripped+Fail Tabs and newlines as leading/trailing whitespace are stripped+Fail Single token without commas+Fail BCP 47 subtags are preserved within tokens+Fail Double comma produces an empty token between the two commas+Fail Empty string results in a single empty token+Fail A single comma separates two empty tokens+Fail Numeric tokens are parsed without validation+Fail Invalid language tags are stored as tokens without validation\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/styling/svg-element-attributeStyleMap.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/styling/svg-element-attributeStyleMap.txtnew file mode 100644index 00000000000..1d513735e02--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/styling/svg-element-attributeStyleMap.txt@@ -0,0 +1,66 @@+Harness status: OK++Found 61 tests++61 Pass+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <svg>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <g>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <defs>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <desc>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <title>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <symbol>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <use>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <image>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <switch>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <style>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <path>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <rect>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <circle>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <ellipse>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <line>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <polyline>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <polygon>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <text>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <tspan>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <textPath>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <marker>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <linearGradient>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <radialGradient>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <stop>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <pattern>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <clipPath>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <mask>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <a>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <view>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <script>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <animate>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <set>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <animateMotion>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <mpath>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <animateTransform>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <metadata>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <foreignObject>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <filter>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feBlend>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feColorMatrix>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feComponentTransfer>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feFuncR>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feFuncG>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feFuncB>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feFuncA>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feComposite>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feConvolveMatrix>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feDiffuseLighting>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <fePointLight>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feSpotLight>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feDisplacementMap>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feDropShadow>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feFlood>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feGaussianBlur>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feImage>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feMerge>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feMergeNode>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feMorphology>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feSpecularLighting>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feTile>+Pass attributeStyleMap set, get, has, delete, and clear sync correctly on <feTurbulence>\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/text/scripted/getrotationofchar.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/text/scripted/getrotationofchar.txtnew file mode 100644index 00000000000..b91b73f4ed1--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/text/scripted/getrotationofchar.txt@@ -0,0 +1,30 @@+Harness status: OK++Found 25 tests++25 Fail+Fail 'text-orientation: mixed' - horizontal-tb+Fail 'text-orientation: upright' - horizontal-tb+Fail 'text-orientation: sideways' - horizontal-tb+Fail Rotation attribute - horizontal-tb+Fail <textPath> - horizontal-tb+Fail 'text-orientation: mixed' - vertical-rl+Fail 'text-orientation: upright' - vertical-rl+Fail 'text-orientation: sideways' - vertical-rl+Fail Rotation attribute - vertical-rl+Fail <textPath> - vertical-rl+Fail 'text-orientation: mixed' - vertical-lr+Fail 'text-orientation: upright' - vertical-lr+Fail 'text-orientation: sideways' - vertical-lr+Fail Rotation attribute - vertical-lr+Fail <textPath> - vertical-lr+Fail 'text-orientation: mixed' - sideways-rl+Fail 'text-orientation: upright' - sideways-rl+Fail 'text-orientation: sideways' - sideways-rl+Fail Rotation attribute - sideways-rl+Fail <textPath> - sideways-rl+Fail 'text-orientation: mixed' - sideways-lr+Fail 'text-orientation: upright' - sideways-lr+Fail 'text-orientation: sideways' - sideways-lr+Fail Rotation attribute - sideways-lr+Fail <textPath> - sideways-lr\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-initial-values.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-initial-values.txtnew file mode 100644index 00000000000..6055c864758--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-initial-values.txt@@ -0,0 +1,3 @@+Harness status: Error++Found 0 testsdiff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-invalid-values.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-invalid-values.txtnew file mode 100644index 00000000000..473f4793c92--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-invalid-values.txt@@ -0,0 +1,58 @@+Harness status: OK++Found 52 tests++13 Pass+39 Fail+Fail SVGAnimatedEnumeration, invalid values, SVGClipPathElement.prototype.clipPathUnits (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGClipPathElement.prototype.clipPathUnits (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGComponentTransferFunctionElement.prototype.type (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGComponentTransferFunctionElement.prototype.type (content attribute is not rewritten)+Pass SVGAnimatedEnumeration, invalid values, SVGFEBlendElement.prototype.mode (empty string)+Pass SVGAnimatedEnumeration, invalid values, SVGFEBlendElement.prototype.mode (content attribute is not rewritten)+Pass SVGAnimatedEnumeration, invalid values, SVGFEColorMatrixElement.prototype.type (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGFEColorMatrixElement.prototype.type (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGFECompositeElement.prototype.operator (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGFECompositeElement.prototype.operator (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGFEConvolveMatrixElement.prototype.edgeMode (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGFEConvolveMatrixElement.prototype.edgeMode (content attribute is not rewritten)+Pass SVGAnimatedEnumeration, invalid values, SVGFEDisplacementMapElement.prototype.xChannelSelector (empty string)+Pass SVGAnimatedEnumeration, invalid values, SVGFEDisplacementMapElement.prototype.xChannelSelector (content attribute is not rewritten)+Pass SVGAnimatedEnumeration, invalid values, SVGFEDisplacementMapElement.prototype.yChannelSelector (empty string)+Pass SVGAnimatedEnumeration, invalid values, SVGFEDisplacementMapElement.prototype.yChannelSelector (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGFEGaussianBlurElement.prototype.edgeMode (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGFEGaussianBlurElement.prototype.edgeMode (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGFEMorphologyElement.prototype.operator (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGFEMorphologyElement.prototype.operator (content attribute is not rewritten)+Pass SVGAnimatedEnumeration, invalid values, SVGFETurbulenceElement.prototype.stitchTiles (empty string)+Pass SVGAnimatedEnumeration, invalid values, SVGFETurbulenceElement.prototype.stitchTiles (content attribute is not rewritten)+Pass SVGAnimatedEnumeration, invalid values, SVGFETurbulenceElement.prototype.type (empty string)+Pass SVGAnimatedEnumeration, invalid values, SVGFETurbulenceElement.prototype.type (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGFilterElement.prototype.filterUnits (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGFilterElement.prototype.filterUnits (content attribute is not rewritten)+Pass SVGAnimatedEnumeration, invalid values, SVGFilterElement.prototype.primitiveUnits (empty string)+Pass SVGAnimatedEnumeration, invalid values, SVGFilterElement.prototype.primitiveUnits (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGGradientElement.prototype.gradientUnits (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGGradientElement.prototype.gradientUnits (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGGradientElement.prototype.spreadMethod (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGGradientElement.prototype.spreadMethod (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGMarkerElement.prototype.markerUnits (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGMarkerElement.prototype.markerUnits (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGMarkerElement.prototype.orientType (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGMarkerElement.prototype.orientType (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGMaskElement.prototype.maskUnits (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGMaskElement.prototype.maskUnits (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGMaskElement.prototype.maskContentUnits (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGMaskElement.prototype.maskContentUnits (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGPatternElement.prototype.patternUnits (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGPatternElement.prototype.patternUnits (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGPatternElement.prototype.patternContentUnits (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGPatternElement.prototype.patternContentUnits (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGTextContentElement.prototype.lengthAdjust (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGTextContentElement.prototype.lengthAdjust (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGTextPathElement.prototype.method (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGTextPathElement.prototype.method (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGTextPathElement.prototype.spacing (empty string)+Fail SVGAnimatedEnumeration, invalid values, SVGTextPathElement.prototype.spacing (content attribute is not rewritten)+Fail SVGAnimatedEnumeration, invalid values, SVGFEBlendElement.prototype.mode (plus-darker is not a blend mode)+Fail SVGAnimatedEnumeration, invalid values, SVGFEBlendElement.prototype.mode (plus-lighter is not a blend mode)\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-keywords.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-keywords.txtnew file mode 100644index 00000000000..bc348434dc5--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-keywords.txt@@ -0,0 +1,38 @@+Harness status: OK++Found 32 tests++12 Pass+20 Fail+Pass SVGAnimatedEnumeration, keyword values, SVGComponentTransferFunctionElement.prototype.type (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGComponentTransferFunctionElement.prototype.type (case-sensitive)+Pass SVGAnimatedEnumeration, keyword values, SVGFEBlendElement.prototype.mode (keywords)+Pass SVGAnimatedEnumeration, keyword values, SVGFEBlendElement.prototype.mode (case-sensitive)+Pass SVGAnimatedEnumeration, keyword values, SVGFEColorMatrixElement.prototype.type (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGFEColorMatrixElement.prototype.type (case-sensitive)+Pass SVGAnimatedEnumeration, keyword values, SVGFECompositeElement.prototype.operator (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGFECompositeElement.prototype.operator (case-sensitive)+Fail SVGAnimatedEnumeration, keyword values, SVGFEConvolveMatrixElement.prototype.edgeMode (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGFEConvolveMatrixElement.prototype.edgeMode (case-sensitive)+Pass SVGAnimatedEnumeration, keyword values, SVGFEDisplacementMapElement.prototype.xChannelSelector (keywords)+Pass SVGAnimatedEnumeration, keyword values, SVGFEDisplacementMapElement.prototype.xChannelSelector (case-sensitive)+Fail SVGAnimatedEnumeration, keyword values, SVGFEGaussianBlurElement.prototype.edgeMode (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGFEGaussianBlurElement.prototype.edgeMode (case-sensitive)+Pass SVGAnimatedEnumeration, keyword values, SVGFEMorphologyElement.prototype.operator (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGFEMorphologyElement.prototype.operator (case-sensitive)+Pass SVGAnimatedEnumeration, keyword values, SVGFETurbulenceElement.prototype.type (keywords)+Pass SVGAnimatedEnumeration, keyword values, SVGFETurbulenceElement.prototype.type (case-sensitive)+Pass SVGAnimatedEnumeration, keyword values, SVGFETurbulenceElement.prototype.stitchTiles (keywords)+Pass SVGAnimatedEnumeration, keyword values, SVGFETurbulenceElement.prototype.stitchTiles (case-sensitive)+Fail SVGAnimatedEnumeration, keyword values, SVGGradientElement.prototype.spreadMethod (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGGradientElement.prototype.spreadMethod (case-sensitive)+Fail SVGAnimatedEnumeration, keyword values, SVGGradientElement.prototype.gradientUnits (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGGradientElement.prototype.gradientUnits (case-sensitive)+Fail SVGAnimatedEnumeration, keyword values, SVGMarkerElement.prototype.markerUnits (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGMarkerElement.prototype.markerUnits (case-sensitive)+Fail SVGAnimatedEnumeration, keyword values, SVGTextContentElement.prototype.lengthAdjust (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGTextContentElement.prototype.lengthAdjust (case-sensitive)+Fail SVGAnimatedEnumeration, keyword values, SVGTextPathElement.prototype.method (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGTextPathElement.prototype.method (case-sensitive)+Fail SVGAnimatedEnumeration, keyword values, SVGTextPathElement.prototype.spacing (keywords)+Fail SVGAnimatedEnumeration, keyword values, SVGTextPathElement.prototype.spacing (case-sensitive)\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedInteger-initial-values.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedInteger-initial-values.txtnew file mode 100644index 00000000000..b08c4c46d63--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedInteger-initial-values.txt@@ -0,0 +1,16 @@+Harness status: OK++Found 10 tests++2 Pass+8 Fail+Fail SVGAnimatedInteger, initial values, SVGFEConvolveMatrixElement.prototype.orderX (remove)+Fail SVGAnimatedInteger, initial values, SVGFEConvolveMatrixElement.prototype.orderX (invalid value)+Fail SVGAnimatedInteger, initial values, SVGFEConvolveMatrixElement.prototype.orderY (remove)+Fail SVGAnimatedInteger, initial values, SVGFEConvolveMatrixElement.prototype.orderY (invalid value)+Fail SVGAnimatedInteger, initial values, SVGFEConvolveMatrixElement.prototype.targetX (remove)+Fail SVGAnimatedInteger, initial values, SVGFEConvolveMatrixElement.prototype.targetX (invalid value)+Fail SVGAnimatedInteger, initial values, SVGFEConvolveMatrixElement.prototype.targetY (remove)+Fail SVGAnimatedInteger, initial values, SVGFEConvolveMatrixElement.prototype.targetY (invalid value)+Pass SVGAnimatedInteger, initial values, SVGFETurbulenceElement.prototype.numOctaves (remove)+Pass SVGAnimatedInteger, initial values, SVGFETurbulenceElement.prototype.numOctaves (invalid value)\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-initial-values.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-initial-values.txtnew file mode 100644index 00000000000..0b0c85848c6--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-initial-values.txt@@ -0,0 +1,108 @@+Harness status: OK++Found 102 tests++50 Pass+52 Fail+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.slope (remove)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.slope (invalid value)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.intercept (remove)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.intercept (invalid value)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.amplitude (remove)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.amplitude (invalid value)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.exponent (remove)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.exponent (invalid value)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.offset (remove)+Pass SVGAnimatedNumber, initial values, SVGComponentTransferFunctionElement.prototype.offset (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFECompositeElement.prototype.k1 (remove)+Pass SVGAnimatedNumber, initial values, SVGFECompositeElement.prototype.k1 (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFECompositeElement.prototype.k2 (remove)+Pass SVGAnimatedNumber, initial values, SVGFECompositeElement.prototype.k2 (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFECompositeElement.prototype.k3 (remove)+Pass SVGAnimatedNumber, initial values, SVGFECompositeElement.prototype.k3 (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFECompositeElement.prototype.k4 (remove)+Pass SVGAnimatedNumber, initial values, SVGFECompositeElement.prototype.k4 (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEConvolveMatrixElement.prototype.divisor (remove)+Fail SVGAnimatedNumber, initial values, SVGFEConvolveMatrixElement.prototype.divisor (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEConvolveMatrixElement.prototype.bias (remove)+Fail SVGAnimatedNumber, initial values, SVGFEConvolveMatrixElement.prototype.bias (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEConvolveMatrixElement.prototype.kernelUnitLengthX (remove)+Fail SVGAnimatedNumber, initial values, SVGFEConvolveMatrixElement.prototype.kernelUnitLengthX (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEConvolveMatrixElement.prototype.kernelUnitLengthY (remove)+Fail SVGAnimatedNumber, initial values, SVGFEConvolveMatrixElement.prototype.kernelUnitLengthY (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEDiffuseLightingElement.prototype.surfaceScale (remove)+Fail SVGAnimatedNumber, initial values, SVGFEDiffuseLightingElement.prototype.surfaceScale (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEDiffuseLightingElement.prototype.diffuseConstant (remove)+Fail SVGAnimatedNumber, initial values, SVGFEDiffuseLightingElement.prototype.diffuseConstant (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEDiffuseLightingElement.prototype.kernelUnitLengthX (remove)+Fail SVGAnimatedNumber, initial values, SVGFEDiffuseLightingElement.prototype.kernelUnitLengthX (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEDiffuseLightingElement.prototype.kernelUnitLengthY (remove)+Fail SVGAnimatedNumber, initial values, SVGFEDiffuseLightingElement.prototype.kernelUnitLengthY (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEDisplacementMapElement.prototype.scale (remove)+Pass SVGAnimatedNumber, initial values, SVGFEDisplacementMapElement.prototype.scale (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEDistantLightElement.prototype.azimuth (remove)+Fail SVGAnimatedNumber, initial values, SVGFEDistantLightElement.prototype.azimuth (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEDistantLightElement.prototype.elevation (remove)+Fail SVGAnimatedNumber, initial values, SVGFEDistantLightElement.prototype.elevation (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEDropShadowElement.prototype.dx (remove)+Pass SVGAnimatedNumber, initial values, SVGFEDropShadowElement.prototype.dx (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEDropShadowElement.prototype.dy (remove)+Pass SVGAnimatedNumber, initial values, SVGFEDropShadowElement.prototype.dy (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEDropShadowElement.prototype.stdDeviationX (remove)+Pass SVGAnimatedNumber, initial values, SVGFEDropShadowElement.prototype.stdDeviationX (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEDropShadowElement.prototype.stdDeviationY (remove)+Pass SVGAnimatedNumber, initial values, SVGFEDropShadowElement.prototype.stdDeviationY (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEGaussianBlurElement.prototype.stdDeviationX (remove)+Pass SVGAnimatedNumber, initial values, SVGFEGaussianBlurElement.prototype.stdDeviationX (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEGaussianBlurElement.prototype.stdDeviationY (remove)+Pass SVGAnimatedNumber, initial values, SVGFEGaussianBlurElement.prototype.stdDeviationY (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEMorphologyElement.prototype.radiusX (remove)+Pass SVGAnimatedNumber, initial values, SVGFEMorphologyElement.prototype.radiusX (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEMorphologyElement.prototype.radiusY (remove)+Pass SVGAnimatedNumber, initial values, SVGFEMorphologyElement.prototype.radiusY (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEOffsetElement.prototype.dx (remove)+Pass SVGAnimatedNumber, initial values, SVGFEOffsetElement.prototype.dx (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFEOffsetElement.prototype.dy (remove)+Pass SVGAnimatedNumber, initial values, SVGFEOffsetElement.prototype.dy (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEPointLightElement.prototype.x (remove)+Fail SVGAnimatedNumber, initial values, SVGFEPointLightElement.prototype.x (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEPointLightElement.prototype.y (remove)+Fail SVGAnimatedNumber, initial values, SVGFEPointLightElement.prototype.y (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFEPointLightElement.prototype.z (remove)+Fail SVGAnimatedNumber, initial values, SVGFEPointLightElement.prototype.z (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.surfaceScale (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.surfaceScale (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.specularConstant (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.specularConstant (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.specularExponent (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.specularExponent (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.kernelUnitLengthX (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.kernelUnitLengthX (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.kernelUnitLengthY (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpecularLightingElement.prototype.kernelUnitLengthY (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.x (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.x (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.y (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.y (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.z (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.z (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.pointsAtX (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.pointsAtX (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.pointsAtY (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.pointsAtY (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.pointsAtZ (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.pointsAtZ (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.specularExponent (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.specularExponent (invalid value)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.limitingConeAngle (remove)+Fail SVGAnimatedNumber, initial values, SVGFESpotLightElement.prototype.limitingConeAngle (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFETurbulenceElement.prototype.baseFrequencyX (remove)+Pass SVGAnimatedNumber, initial values, SVGFETurbulenceElement.prototype.baseFrequencyX (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFETurbulenceElement.prototype.baseFrequencyY (remove)+Pass SVGAnimatedNumber, initial values, SVGFETurbulenceElement.prototype.baseFrequencyY (invalid value)+Pass SVGAnimatedNumber, initial values, SVGFETurbulenceElement.prototype.seed (remove)+Pass SVGAnimatedNumber, initial values, SVGFETurbulenceElement.prototype.seed (invalid value)+Pass SVGAnimatedNumber, initial values, SVGGeometryElement.prototype.pathLength (remove)+Pass SVGAnimatedNumber, initial values, SVGGeometryElement.prototype.pathLength (invalid value)+Pass SVGAnimatedNumber, initial values, SVGStopElement.prototype.offset (remove)+Pass SVGAnimatedNumber, initial values, SVGStopElement.prototype.offset (invalid value)\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.txtnew file mode 100644index 00000000000..e7456ec57e4--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.txt@@ -0,0 +1,106 @@+Harness status: OK++Found 100 tests++71 Pass+29 Fail+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (spaces around the value)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (newlines around the value)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (tabs around the value)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (empty string)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (unit suffix)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (trailing junk)+Fail SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (two signs)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (lone sign)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (content attribute is not rewritten)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (a second number is not allowed)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (accepted number syntax)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (spaces around the value)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (newlines around the value)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (tabs around the value)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (empty string)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (unit suffix)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (trailing junk)+Fail SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (two signs)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (lone sign)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (content attribute is not rewritten)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (a second number is not allowed)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (accepted number syntax)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (spaces around the value)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (newlines around the value)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (tabs around the value)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (empty string)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (unit suffix)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (trailing junk)+Fail SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (two signs)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (lone sign)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (content attribute is not rewritten)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (a second number is not allowed)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (accepted number syntax)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (spaces around the value)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (newlines around the value)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (tabs around the value)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (empty string)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (unit suffix)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (trailing junk)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (trailing dot)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (two signs)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (lone sign)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (content attribute is not rewritten)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (a second number is not allowed)+Fail SVGAnimatedNumber, invalid values, SVGFEDiffuseLightingElement.prototype.surfaceScale (accepted number syntax)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (spaces around the value)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (newlines around the value)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (tabs around the value)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (empty string)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (unit suffix)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (trailing junk)+Fail SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (two signs)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (lone sign)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (content attribute is not rewritten)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (a second number is not allowed)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (accepted number syntax)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (spaces around the value)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (newlines around the value)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (tabs around the value)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (empty string)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (unit suffix)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (trailing junk)+Fail SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (two signs)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (lone sign)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (content attribute is not rewritten)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (a second number is not allowed)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (accepted number syntax)+Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (one number, surrounded by whitespace)+Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (two numbers, surrounded by whitespace)+Fail SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (comma separated, "3,4")+Fail SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (comma separated, "3, 4")+Fail SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (both revert, "3 abc")+Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (both revert, "3px")+Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (both revert, "")+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (one number, surrounded by whitespace)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (two numbers, surrounded by whitespace)+Fail SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (comma separated, "3,4")+Fail SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (comma separated, "3, 4")+Fail SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (both revert, "3 abc")+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (both revert, "3px")+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (both revert, "")+Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (one number, surrounded by whitespace)+Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (two numbers, surrounded by whitespace)+Fail SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (comma separated, "3,4")+Fail SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (comma separated, "3, 4")+Fail SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (both revert, "3 abc")+Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (both revert, "3px")+Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (both revert, "")+Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (one number, surrounded by whitespace)+Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (two numbers, surrounded by whitespace)+Fail SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (comma separated, "3,4")+Fail SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (comma separated, "3, 4")+Fail SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (both revert, "3 abc")+Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (both revert, "3px")+Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (both revert, "")\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.txtnew file mode 100644index 00000000000..9610f425e68--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.txt@@ -0,0 +1,18 @@+Harness status: OK++Found 13 tests++13 Fail+Fail SVGGeometryElement.prototype.isPointInStroke, no arguments.+Fail SVGGeometryElement.prototype.isPointInStroke, null/undefined.+Fail SVGGeometryElement.prototype.isPointInStroke, non-finite argument.+Fail SVGGeometryElement.prototype.isPointInStroke, functional test.+Fail SVGGeometryElement.prototype.isPointInStroke, functional test with zoom.+Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-dasharray'.+Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-dashoffset'.+Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-miterlimit'.+Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-linejoin'.+Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-linecap'.+Fail SVGGeometryElement.prototype.isPointInStroke, 'pathLength'.+Fail SVGGeometryElement.prototype.isPointInStroke, 'vector-effect'.+Fail SVGGeometryElement.prototype.isPointInStroke, 'visibility' and 'pointer-events' have no effect.\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGraphicsElement.getBBox-01.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGraphicsElement.getBBox-01.txtnew file mode 100644index 00000000000..fd265dbe758--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGraphicsElement.getBBox-01.txt@@ -0,0 +1,25 @@+Harness status: OK++Found 19 tests++8 Pass+11 Fail+Pass getBBox on detached element+Pass getBBox on polygon with no points attribute+Pass getBBox on polyline with no points attribute+Pass getBBox on path with no d attribute+Pass getBBox on path with no valid path segments in d attribute+Pass getBBox on polygon with no valid point in the points attribute+Pass getBBox on polyline with no valid point in the points attribute+Fail polygon doesn't contribute to parent bbox+Fail group with hidden child+Fail path doesn't contribute to parent bbox+Fail path with only invalid segments doesn't contribute to parent bbox+Fail polyline doesn't contribute to parent bbox+Fail polygon with no valid points doesn't contribute to parent bbox+Fail polyline with no valid points doesn't contribute to parent bbox+Pass getBBox on path with no height+Fail path with no height should contribute to parent bbox+Fail arc bbox should be tight+Fail empty foreignObject does not contribute to parent bbox+Fail empty image does not contribute to parent bbox\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-animVal-reflects-base-value.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-animVal-reflects-base-value.txtnew file mode 100644index 00000000000..092f9d16cdd--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-animVal-reflects-base-value.txt@@ -0,0 +1,26 @@+Harness status: OK++Found 20 tests++3 Pass+17 Fail+Fail SVGNumberList (rotate on text): animVal read before an attribute change reports the new item count+Fail SVGNumberList (rotate on text): animVal read before an attribute change reports the new value+Fail SVGNumberList (rotate on text): the animVal list object survives an attribute change+Fail SVGNumberList (rotate on text): animVal reports the new item count after a baseVal DOM change+Pass SVGNumberList (rotate on text): animVal items are read only+Fail SVGLengthList (x on text): animVal read before an attribute change reports the new item count+Fail SVGLengthList (x on text): animVal read before an attribute change reports the new value+Fail SVGLengthList (x on text): the animVal list object survives an attribute change+Fail SVGLengthList (x on text): animVal reports the new item count after a baseVal DOM change+Pass SVGLengthList (x on text): animVal items are read only+Fail SVGPointList (points on polyline, animatedPoints): animVal read before an attribute change reports the new item count+Fail SVGPointList (points on polyline, animatedPoints): animVal read before an attribute change reports the new value+Pass SVGPointList (points on polyline, animatedPoints): the animVal list object survives an attribute change+Fail SVGPointList (points on polyline, animatedPoints): animVal reports the new item count after a baseVal DOM change+Fail SVGPointList (points on polyline, animatedPoints): animVal items are read only+Fail SVGTransformList (gradientTransform on linearGradient): animVal read before an attribute change reports the new item count+Fail SVGTransformList (gradientTransform on linearGradient): animVal read before an attribute change reports the new value+Fail SVGTransformList (gradientTransform on linearGradient): the animVal list object survives an attribute change+Fail SVGTransformList (gradientTransform on linearGradient): animVal reports the new item count after a baseVal DOM change+Fail SVGTransformList (gradientTransform on linearGradient): animVal items are read only\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.txtnew file mode 100644index 00000000000..7304e009f6b--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.txt@@ -0,0 +1,65 @@+Harness status: OK++Found 59 tests++5 Pass+54 Fail+Pass SVGNumberList (rotate on text): getItem returns the same object for one index, with no attribute change+Fail SVGNumberList (rotate on text): a same-count change updates the values of the held items+Pass SVGNumberList (rotate on text): a same-count change keeps the held item in the list+Fail SVGNumberList (rotate on text): the held item is still attached after a same-count change+Fail SVGNumberList (rotate on text): a grow updates the held item and appends new ones+Fail SVGNumberList (rotate on text): a shrink updates the held items that are still in range+Fail SVGNumberList (rotate on text): a shrink detaches the truncated item, which keeps its value+Fail SVGNumberList (rotate on text): the truncated item stops reaching the element and stops being read only+Fail SVGNumberList (rotate on text): the list interface object survives the change+Fail SVGNumberList (rotate on text): an empty string empties the list and detaches every item+Pass SVGLengthList (x on text): getItem returns the same object for one index, with no attribute change+Fail SVGLengthList (x on text): a same-count change updates the values of the held items+Pass SVGLengthList (x on text): a same-count change keeps the held item in the list+Fail SVGLengthList (x on text): the held item is still attached after a same-count change+Fail SVGLengthList (x on text): a grow updates the held item and appends new ones+Fail SVGLengthList (x on text): a shrink updates the held items that are still in range+Fail SVGLengthList (x on text): a shrink detaches the truncated item, which keeps its value+Fail SVGLengthList (x on text): the truncated item stops reaching the element and stops being read only+Fail SVGLengthList (x on text): the list interface object survives the change+Fail SVGLengthList (x on text): an empty string empties the list and detaches every item+Fail SVGPointList (points on polyline): getItem returns the same object for one index, with no attribute change+Fail SVGPointList (points on polyline): a same-count change updates the values of the held items+Fail SVGPointList (points on polyline): a same-count change keeps the held item in the list+Fail SVGPointList (points on polyline): the held item is still attached after a same-count change+Fail SVGPointList (points on polyline): a grow updates the held item and appends new ones+Fail SVGPointList (points on polyline): a shrink updates the held items that are still in range+Fail SVGPointList (points on polyline): a shrink detaches the truncated item, which keeps its value+Fail SVGPointList (points on polyline): the truncated item stops reaching the element and stops being read only+Pass SVGPointList (points on polyline): the list interface object survives the change+Fail SVGPointList (points on polyline): an empty string empties the list and detaches every item+Fail SVGTransformList (transform on g): getItem returns the same object for one index, with no attribute change+Fail SVGTransformList (transform on g): a same-count change updates the values of the held items+Fail SVGTransformList (transform on g): a same-count change keeps the held item in the list+Fail SVGTransformList (transform on g): the held item is still attached after a same-count change+Fail SVGTransformList (transform on g): a grow updates the held item and appends new ones+Fail SVGTransformList (transform on g): a shrink updates the held items that are still in range+Fail SVGTransformList (transform on g): a shrink detaches the truncated item, which keeps its value+Fail SVGTransformList (transform on g): the truncated item stops reaching the element and stops being read only+Fail SVGTransformList (transform on g): the list interface object survives the change+Fail SVGTransformList (transform on g): an empty string empties the list and detaches every item+Fail SVGTransformList (gradientTransform on linearGradient): getItem returns the same object for one index, with no attribute change+Fail SVGTransformList (gradientTransform on linearGradient): a same-count change updates the values of the held items+Fail SVGTransformList (gradientTransform on linearGradient): a same-count change keeps the held item in the list+Fail SVGTransformList (gradientTransform on linearGradient): the held item is still attached after a same-count change+Fail SVGTransformList (gradientTransform on linearGradient): a grow updates the held item and appends new ones+Fail SVGTransformList (gradientTransform on linearGradient): a shrink updates the held items that are still in range+Fail SVGTransformList (gradientTransform on linearGradient): a shrink detaches the truncated item, which keeps its value+Fail SVGTransformList (gradientTransform on linearGradient): the truncated item stops reaching the element and stops being read only+Fail SVGTransformList (gradientTransform on linearGradient): the list interface object survives the change+Fail SVGTransformList (gradientTransform on linearGradient): an empty string empties the list and detaches every item+Fail SVGTransformList (transform): a changed transform function keeps the held item in the list+Fail SVGTransformList (transform): a changed transform function updates the held item's type and matrix+Fail SVGTransformList (transform): swapping two transform functions keeps both held items+Fail SVGTransformList (transform): an empty list detaches every item+Fail SVGTransformList (gradientTransform): a changed transform function keeps the held item in the list+Fail SVGTransformList (gradientTransform): a changed transform function updates the held item's type and matrix+Fail SVGTransformList (gradientTransform): swapping two transform functions keeps both held items+Fail SVGTransformList (gradientTransform): an empty list detaches every item+Fail SVGStringList: a change replaces the list rather than updating items\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGPointList-error-handling.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGPointList-error-handling.txtnew file mode 100644index 00000000000..df358f46cbd--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGPointList-error-handling.txt@@ -0,0 +1,22 @@+Harness status: OK++Found 16 tests++2 Pass+14 Fail+Fail polyline with an odd number of coordinates drops the last one and keeps the rest+Fail polyline whose points value begins with a non-numeric token renders nothing+Fail polyline whose points value begins with a separator renders nothing+Fail polyline with a points value of a single separator renders nothing+Fail polyline with an empty points value renders nothing+Fail polyline with a whitespace-only points value renders nothing+Fail polyline with no points attribute renders nothing+Pass polyline with a points value in error does not rewrite the content attribute+Fail polygon with an odd number of coordinates drops the last one and keeps the rest+Fail polygon whose points value begins with a non-numeric token renders nothing+Fail polygon whose points value begins with a separator renders nothing+Fail polygon with a points value of a single separator renders nothing+Fail polygon with an empty points value renders nothing+Fail polygon with a whitespace-only points value renders nothing+Fail polygon with no points attribute renders nothing+Pass polygon with a points value in error does not rewrite the content attribute\ No newline at end of filediff --git a/Tests/LibWeb/Text/input/wpt-import/svg/coordinate-systems/SVGTransformList.list-01.html b/Tests/LibWeb/Text/input/wpt-import/svg/coordinate-systems/SVGTransformList.list-01.htmlnew file mode 100644index 00000000000..7b81d9a5a2c--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/coordinate-systems/SVGTransformList.list-01.html@@ -0,0 +1,225 @@+<!DOCTYPE HTML>+<title>SVGTransformList interface</title>+<script src="../../resources/testharness.js"></script>+<script src="../../resources/testharnessreport.js"></script>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/coords.html#InterfaceSVGTransformList">+<svg><circle id="circle1"/></svg>+<script>+const svg = document.querySelector('svg');++function makeAnimatedTransformList(transformString) {+ const e = document.createElementNS('http://www.w3.org/2000/svg', 'circle');+ if (transformString) {+ e.setAttribute('transform', transformString);+ }+ return e.transform;+}++function makeTransformList(transformString) {+ return makeAnimatedTransformList(transformString).baseVal;+}++function assert_svg_transform(actual, expected) {+ assert_equals(actual.type, expected.type, `SVGTransform 'type'`);+ for (let component of ['a', 'b', 'c', 'd', 'e', 'f']) {+ assert_equals(actual.matrix[component], expected.matrix[component],+ `SVGTransform.matrix component '${component}'`);+ }+}++function assert_svg_transform_list(actual, expected) {+ assert_equals(actual.length, expected.length, 'list lengths');+ for (let i = 0; i < actual.length; ++i) {+ assert_svg_transform(actual[i], expected[i]);+ }+}++function rotate(degrees, x, y) {+ const r = svg.createSVGTransform();+ r.setRotate(degrees, x ?? 0, y ?? 0);+ return r;+}++function scale(x, y) {+ const s = svg.createSVGTransform();+ s.setScale(x, y);+ return s;+}++function skewX(degrees) {+ const s = svg.createSVGTransform();+ s.setSkewX(degrees);+ return s;+}++function translate(x, y) {+ const t = svg.createSVGTransform();+ t.setTranslate(x, y);+ return t;+}++test(function() {+ const animatedTransformList = makeAnimatedTransformList('scale(2, 2) translate(10 10)');+ const animVal = animatedTransformList.animVal;+ const baseVal = animatedTransformList.baseVal;+ assert_equals(baseVal.length, 2);+ assert_equals(animVal.length, 2);+ assert_svg_transform_list(baseVal, [scale(2, 2), translate(10, 10)]);+ assert_svg_transform_list(animVal, [scale(2, 2), translate(10, 10)]);++ // Spec: The object referenced by animVal will always be distinct from the+ // one referenced by baseVal, even when the attribute is not animated.+ assert_not_equals(baseVal, animVal);+}, `${document.title}, animVal distinct from baseVal`);++test(function() {+ const animatedTransformList = makeAnimatedTransformList('scale(2, 2) translate(10 10)');+ // Testing animVal clear throws.+ assert_throws_dom('NoModificationAllowedError', function() {+ animatedTransformList.animVal.clear();+ });+}, `${document.title}, animVal is read-only`);++test(function() {+ const transformList = makeTransformList('scale(2, 2) translate(10 10)');+ assert_svg_transform_list(transformList, [scale(2, 2), translate(10, 10)]);++ assert_equals(transformList.numberOfItems, transformList.length, 'legacy length getter');++ assert_svg_transform(transformList.getItem(0), transformList[0], 'legacy getItem()');+ assert_svg_transform(transformList.getItem(1), transformList[1], 'legacy getItem()');+}, `${document.title}, legacy getters / list length`);++test(function() {+ const transformList = makeTransformList();+ for (let err of [30, 'aString', circle1, null]) {+ assert_throws_js(TypeError, function() { transformList.initialize(err); });+ }+}, `${document.title}, initialize() invalid arguments`);++test(function() {+ const transformList = makeTransformList('scale(2, 2) translate(10 10)');+ // Test uncommon arguments for getItem().+ assert_throws_dom('IndexSizeError', function() { transformList.getItem(30); });+ assert_svg_transform(transformList.getItem('aString'), scale(2, 2));+ assert_svg_transform(transformList.getItem(circle1), scale(2, 2));+ assert_svg_transform(transformList.getItem(null), scale(2, 2));+}, `${document.title}, getItem() arguments`);++test(function() {+ const transformList = makeTransformList('scale(2, 2) translate(10 10)');+ // Test uncommon arguments for insertItemBefore().+ assert_throws_js(TypeError, function() { transformList.insertItemBefore(30); });+ assert_throws_js(TypeError, function() { transformList.insertItemBefore(30, 0); });+ for (let err of ['aString', circle1, null]) {+ assert_throws_js(TypeError, function() { transformList.insertItemBefore(err); });+ assert_throws_js(TypeError, function() { transformList.insertItemBefore(err, 0); });+ }+}, `${document.title}, insertItemBefore() invalid arguments`);++test(function() {+ const transformList = makeTransformList('scale(2, 2) translate(10 10)');+ assert_svg_transform(transformList.insertItemBefore(transformList[1], 'aString'), translate(10, 10));+ assert_svg_transform_list(transformList, [translate(10, 10), scale(2, 2),+ translate(10, 10)]);++ assert_svg_transform(transformList.insertItemBefore(transformList[1], circle1), scale(2, 2));+ assert_svg_transform_list(transformList, [scale(2, 2), translate(10, 10),+ scale(2, 2), translate(10, 10)]);++ assert_svg_transform(transformList.insertItemBefore(transformList[1], null), translate(10, 10));+ assert_svg_transform_list(transformList, [translate(10, 10), scale(2, 2),+ translate(10, 10), scale(2, 2),+ translate(10, 10)]);++ assert_svg_transform(transformList.insertItemBefore(transformList[1], 0), scale(2, 2));+ assert_svg_transform_list(transformList, [scale(2, 2), translate(10, 10),+ scale(2, 2), translate(10, 10),+ scale(2, 2), translate(10, 10)]);+}, `${document.title}, insertItemBefore()`);++test(function() {+ const transformList = makeTransformList('scale(2, 2) translate(10 10)');+ // Test uncommon arguments for replaceItem().+ for (let err of [30, 'aString', circle1, null]) {+ assert_throws_js(TypeError, function() { transformList.replaceItem(err); });+ assert_throws_js(TypeError, function() { transformList.replaceItem(err, 0); });+ }+}, `${document.title}, replaceItem() invalid arguments`);++test(function() {+ const transformList = makeTransformList('scale(2, 2) translate(10 10)');+ // Test uncommon values for indexed setter.+ for (let err of [30, 'aString', circle1, null]) {+ assert_throws_js(TypeError, function() { transformList[0] = err; });+ }+}, `${document.title}, indexed setter`);++test(function() {+ let transformList = makeTransformList('rotate(90) scale(2 2) translate(10 10) skewX(45)');+ assert_svg_transform_list(transformList, [rotate(90), scale(2, 2),+ translate(10, 10), skewX(45)]);++ assert_svg_transform(transformList.replaceItem(transformList[3], 0), skewX(45));+ assert_svg_transform_list(transformList, [skewX(45), scale(2, 2),+ translate(10, 10), skewX(45)]);++ transformList = makeTransformList('rotate(90) scale(2 2) translate(10 10) skewX(45)');+ assert_svg_transform_list(transformList, [rotate(90), scale(2, 2),+ translate(10, 10), skewX(45)]);++ assert_svg_transform(transformList.replaceItem(transformList[0], 'aString'), rotate(90));+ assert_svg_transform_list(transformList, [rotate(90), scale(2, 2),+ translate(10, 10), skewX(45)]);++ assert_svg_transform(transformList.replaceItem(transformList[0], circle1), rotate(90));+ assert_svg_transform_list(transformList, [rotate(90), scale(2, 2),+ translate(10, 10), skewX(45)]);++ assert_svg_transform(transformList.replaceItem(transformList[0], null), rotate(90));+ assert_svg_transform_list(transformList, [rotate(90), scale(2, 2),+ translate(10, 10), skewX(45)]);+}, `${document.title}, replaceItem()`);++test(function() {+ const transformList = makeTransformList('rotate(90) scale(2 2) translate(10 10) skewX(45)');+ assert_svg_transform_list(transformList, [rotate(90), scale(2, 2),+ translate(10, 10), skewX(45)]);++ // Test uncommon arguments for removeItem().+ assert_throws_dom('IndexSizeError', function() { transformList.removeItem(30); });++ assert_svg_transform(transformList.removeItem(0), rotate(90));+ assert_svg_transform_list(transformList, [scale(2, 2), translate(10, 10),+ skewX(45)]);++ assert_svg_transform(transformList.removeItem('aString'), scale(2, 2));+ assert_svg_transform_list(transformList, [translate(10, 10), skewX(45)]);++ assert_svg_transform(transformList.removeItem(circle1), translate(10, 10));+ assert_svg_transform_list(transformList, [skewX(45)]);+}, `${document.title}, removeItem()`);++test(function() {+ const transformList = makeTransformList('scale(2, 2) translate(10 10)');+ // Test uncommon arguments for appendItem().+ for (let err of [30, 'aString', circle1, null]) {+ assert_throws_js(TypeError, function() { transformList.appendItem(err); });+ }+}, `${document.title}, appendItem() invalid arguments`);++test(function() {+ const transformList = makeTransformList();+ // Creating new SVGTransform, with 45 deg rotation about x=50, y=100 and+ // append it to the transform list.+ const transform = rotate(45, 50, 100);+ assert_svg_transform(transformList.appendItem(transform), rotate(45, 50, 100));+ assert_svg_transform_list(transformList, [rotate(45, 50, 100)]);+}, `${document.title}, appendItem()`);++test(function() {+ const transformList = makeTransformList('scale(2 2) translate(10 10)');+ transformList.clear();+ assert_equals(transformList.length, 0);+}, `${document.title}, clear()`);+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter-setter.html b/Tests/LibWeb/Text/input/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter-setter.htmlnew file mode 100644index 00000000000..9a6db978b49--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter-setter.html@@ -0,0 +1,126 @@+<!doctype html>+<meta charset="utf-8">+<title>SVGAElement HyperlinkElementUtils getters and setters with attributes</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<svg>+ <a id="test-anchor">anchor</a>+</svg>+<script>+ // Elements for each test: [property, oldresult, newvalue, newresult, oldurl, newurl]+ // [0] [1] [2] [3] [4] [5]+ const tests = [+ ["hash", "#somehash", "someother", "#someother",+ "http://google.com/index.html#somehash",+ "http://google.com/index.html#someother"],+ ["hash", "#somehash", "#someother", "#someother",+ "http://google.com/index.html#somehash",+ "http://google.com/index.html#someother"],+ ["host", "google.com:1234", "github.com:4444", "github.com:4444",+ "http://google.com:1234/somedir",+ "http://github.com:4444/somedir"],+ ["hostname", "google.com", "github.com", "github.com",+ "http://google.com:1234/somedir",+ "http://github.com:1234/somedir"],+ ["href", "http://google.com:1234/somedir", "http://goo-gle.com:1234/other/x.html", "http://goo-gle.com:1234/other/x.html",+ "http://google.com:1234/somedir",+ "http://goo-gle.com:1234/other/x.html"],+ ["password", "flabada", "blubb", "blubb",+ "https://anonymous:[email protected]/en-US/docs/",+ "https://anonymous:[email protected]/en-US/docs/"],+ ["pathname", "/somedir/someotherdir/index.html", "/newpath/x.txt", "/newpath/x.txt",+ "http://google.com:1234/somedir/someotherdir/index.html",+ "http://google.com:1234/newpath/x.txt"],+ ["port", "1234", "4444", "4444", "http://google.com:1234/somedir", "http://google.com:4444/somedir"],+ ["protocol", "http:", "ftp:", "ftp:", "http://google.com/somedir", "ftp://google.com/somedir"],+ ["protocol", "http:", "ftp", "ftp:", "http://google.com/somedir", "ftp://google.com/somedir"],+ ["search", "?ho", "?hi", "?hi", "http://google.com/q.php?ho", "http://google.com/q.php?hi"],+ ["search", "?ho", "hi", "?hi", "http://google.com/q.php?ho", "http://google.com/q.php?hi"],+ ["search", "?ho", "?hi", "?hi", "http://google.com/?ho", "http://google.com/?hi"],+ ["search", "?ho", "hi", "?hi", "http://google.com/?ho", "http://google.com/?hi"],+ ["username", "anonymous", "wellknown", "wellknown",+ "https://anonymous:[email protected]:1234/en-US/",+ "https://wellknown:[email protected]:1234/en-US/"]+ ];++ const XLINK_NS = "http://www.w3.org/1999/xlink";++ function setupInitialURL(element, mode, url) {+ if(mode === "href" || mode === "both") {+ // It's the same as `element.setAttribute("href", url);`+ element.href.baseVal = url;+ }+ if(mode === "xlink" || mode === "both") {+ element.setAttributeNS(XLINK_NS, "xlink:href", url);+ }+ }++ function getSVGProperty(element, property) {+ if (property === "href") {+ return element.href.baseVal;+ }+ return element[property];+ }++ function setSVGProperty(element, property, value) {+ if (property === "href") {+ element.href.baseVal = value;+ } else {+ element[property] = value;+ }+ }++ function assertFinalURL(element, mode, oldurl, newurl) {+ assert_equals(element.href.baseVal, newurl, "IDL href.baseVal mismatch");++ switch (mode) {+ case "href":+ assert_equals(element.getAttribute("href"), newurl, "Standard href should be updated");+ break;+ case "xlink":+ assert_equals(element.getAttributeNS(XLINK_NS, "href"), newurl, "XLink href should be updated when href is absent");+ break;+ case "both":+ /**+ * When the ‘href’ attribute is present in both the XLink namespace and without a namespace,+ * the value of the attribute without a namespace shall be used.+ *+ * The attribute in the XLink namespace shall be ignored.+ * See https://svgwg.org/svg2-draft/linking.html#XLinkRefAttrs+ */+ assert_equals(element.getAttribute("href"), newurl, "Standard href must be updated in 'both' mode");+ assert_equals(element.getAttributeNS(XLINK_NS, "href"), oldurl, "XLink href should remain unchanged in 'both' mode due to SVG2 priority rules");+ break;+ default:+ assert_unreached(`Unexpected mode: ${mode}`);+ }+ }++ ["href", "xlink", "both"].forEach(mutationMode => {++ for (let i = 0; i < tests.length; i++) {+ test(function (t) {+ const [property, oldresult, newval, newresult, oldurl, newurl] = tests[i];+ const a = document.getElementById("test-anchor");++ t.add_cleanup(() => {+ a.removeAttribute("href");+ a.removeAttributeNS(XLINK_NS, "href");+ });++ setupInitialURL(a, mutationMode, oldurl);++ const r1 = getSVGProperty(a, property);+ assert_equals(r1, oldresult, `Initial getter fail for ${property}`);++ setSVGProperty(a, property, newval);++ const r2 = getSVGProperty(a, property);+ assert_equals(r2, newresult, `Post-mutation getter fail for ${property}`);++ assertFinalURL(a, mutationMode, oldurl, newurl);++ }, `SVGAElement mutation [Mode: ${mutationMode}] (${i}): ${tests[i][0]}`);+ }+ });+</script>\ No newline at end of filediff --git a/Tests/LibWeb/Text/input/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter.html b/Tests/LibWeb/Text/input/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter.htmlnew file mode 100644index 00000000000..76fb9c65854--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/linking/scripted/a-hyperlinkutils-getter.html@@ -0,0 +1,78 @@+<!doctype html>+<meta charset="utf-8">+<title>SVGAElement HyperlinkElementUtils getters with href and xlink:href attributes</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<svg>+ <a id="test-anchor">anchor</a>+</svg>+<script>+ const XLINK_NS = "http://www.w3.org/1999/xlink";++ // Test cases+ // Format: [property, expectedResult, primaryURL, fallbackURL]+ // - primaryURL: Used in 'href', 'xlink', and as the winning 'href' in 'both' mode.+ // - fallbackURL: Used as the ignored 'xlink:href' attribute in 'both' mode to prove priority.+ const getterTests = [+ ["origin", "http://google.com:1234", "http://google.com:1234/somedir", "http://ignored.com:9999/somedir"],+ ["protocol", "http:", "http://google.com/somedir", "https://ignored.com/somedir"],+ ["username", "anonymous", "https://anonymous:[email protected]:1234/en-US/", "https://wronguser:[email protected]:1234/"],+ ["password", "flabada", "https://anonymous:[email protected]/en-US/docs/", "https://anonymous:[email protected]/"],+ ["host", "google.com:1234", "http://google.com:1234/somedir", "http://ignored.com:9999/somedir"],+ ["hostname", "google.com", "http://google.com:1234/somedir", "http://ignored.com:1234/somedir"],+ ["port", "1234", "http://google.com:1234/somedir", "http://google.com:9999/somedir"],+ ["pathname", "/somedir/someotherdir/index.html", "http://google.com:1234/somedir/someotherdir/index.html", "http://google.com:1234/wrongpath/x.html"],+ ["search", "?hi", "http://google.com?hi", "http://ignored.com?wrong"],+ ["hash", "#somehash", "http://google.com#somehash", "http://ignored.com#wrong"],+ ];++ /**+ * Reads a SVG property or href.baseVal on SVGAElement.+ */+ function getSVGProperty(element, property) {+ if (property === "href") {+ return element.href.baseVal;+ }+ return element[property];+ }++ ["href", "xlink", "both"].forEach(mode => {+ for (let i = 0; i < getterTests.length; i++) {+ test(t => {+ const [property, expectedResult, primaryURL, fallbackURL] = getterTests[i];+ const a = document.getElementById("test-anchor");++ t.add_cleanup(() => {+ a.removeAttribute("href");+ a.removeAttributeNS(XLINK_NS, "href");+ });++ // Setup DOM attributes based on mode+ switch (mode) {+ case "href":+ a.setAttribute("href", primaryURL);+ break;+ case "xlink":+ a.setAttributeNS(XLINK_NS, "xlink:href", primaryURL);+ break;+ case "both":+ // Standard href attribute should take precedence over xlink:href (SVG2 spec)+ // See https://svgwg.org/svg2-draft/linking.html#XLinkRefAttrs+ a.setAttribute("href", primaryURL);+ a.setAttributeNS(XLINK_NS, "xlink:href", fallbackURL);+ break;+ default:+ assert_unreached(`Unexpected mode: ${mode}`);+ }++ const actualValue = getSVGProperty(a, property);+ assert_equals(+ actualValue,+ expectedResult,+ `Getter mismatch for property '${property}' under mode '${mode}'`+ );++ }, `SVGAElement HyperlinkElementUtils getter [Mode: ${mode}] (${i}): ${getterTests[i][0]}`);+ }+ });+</script>\ No newline at end of filediff --git a/Tests/LibWeb/Text/input/wpt-import/svg/painting/animations/stroke-dasharray-composition.html b/Tests/LibWeb/Text/input/wpt-import/svg/painting/animations/stroke-dasharray-composition.htmlnew file mode 100644index 00000000000..db8b4f87012--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/painting/animations/stroke-dasharray-composition.html@@ -0,0 +1,166 @@+<!DOCTYPE html>+<meta charset="UTF-8">+<title>stroke-dasharray composition</title>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/painting.html#StrokeDashing">+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<script src="../../../css/support/interpolation-testcommon.js"></script>+<style>+.parent {+ stroke-dasharray: 30 10;+}+.target {+ font-size: 16px;+}+</style>+<body>+<template id="target-template">+ <svg height="400" width="5">+ <path d="M0,0 l0,400" class="target">+ </svg>+</template>+<script>+// stroke-dasharray values are not additive per spec:+// https://w3c.github.io/svgwg/svg2-draft/painting.html#StrokeDashing+// "add" composite falls back to "replace".++// Basic case: both keyframes use add (treated as replace).+test_composition({+ property: 'stroke-dasharray',+ underlying: '5 5',+ addFrom: '0 5',+ addTo: '10 15',+}, [+ {at: -0.6, expect: ' 0 0'}, // Values must be non-negative.+ {at: -0.4, expect: ' 0 1'},+ {at: -0.2, expect: ' 0 3'},+ {at: 0, expect: ' 0 5'},+ {at: 0.2, expect: ' 2 7'},+ {at: 0.4, expect: ' 4 9'},+ {at: 0.6, expect: ' 6 11'},+ {at: 0.8, expect: ' 8 13'},+ {at: 1, expect: '10 15'},+ {at: 1.2, expect: '12 17'},+]);++test_composition({+ property: 'stroke-dasharray',+ underlying: '10 10',+ replaceFrom: '5 10',+ addTo: '5 10',+}, [+ {at: -0.6, expect: '5 10'},+ {at: -0.4, expect: '5 10'},+ {at: -0.2, expect: '5 10'},+ {at: 0, expect: '5 10'},+ {at: 0.2, expect: '5 10'},+ {at: 0.4, expect: '5 10'},+ {at: 0.6, expect: '5 10'},+ {at: 0.8, expect: '5 10'},+ {at: 1, expect: '5 10'},+ {at: 1.2, expect: '5 10'},+]);++test_composition({+ property: 'stroke-dasharray',+ underlying: '10 30',+ addFrom: 'none',+ addTo: '10 10',+}, [+ {at: -1.5, expect: 'none'},+ {at: -0.5, expect: 'none'},+ {at: 0, expect: 'none'},+ {at: 0.4, expect: 'none'},+ {at: 0.5, expect: '10 10'},+ {at: 0.6, expect: '10 10'},+ {at: 1, expect: '10 10'},+ {at: 1.5, expect: '10 10'},+]);++// Differing list lengths+// Lists are repeated until length is equal to lowest common multiple of lengths.+test_composition({+ property: 'stroke-dasharray',+ underlying: '0 5',+ addFrom: '5',+ replaceTo: '15 20 25',+}, [+ {at: -0.2, expect: '3 2 1'},+ {at: 0, expect: '5 5 5'},+ {at: 0.2, expect: '7 8 9'},+ {at: 0.4, expect: '9 11 13'},+ {at: 0.6, expect: '11 14 17'},+ {at: 0.8, expect: '13 17 21'},+ {at: 1, expect: '15 20 25'},+ {at: 1.2, expect: '17 23 29'},+]);++// Lowest common multiple of list lengths not equal to multiple of list lengths+test_composition({+ property: 'stroke-dasharray',+ underlying: '10 30',+ replaceFrom: '5 10 15 20',+ addTo: '15 0 25 10 35 20',+}, [+ {at: -0.2, expect: ' 3 12 13 22 0 8 15 24 1 10 11 20'}, // Values must be non-negative.+ {at: 0, expect: ' 5 10 15 20 5 10 15 20 5 10 15 20'},+ {at: 0.2, expect: ' 7 8 17 18 11 12 15 16 9 10 19 20'},+ {at: 0.4, expect: ' 9 6 19 16 17 14 15 12 13 10 23 20'},+ {at: 0.6, expect: '11 4 21 14 23 16 15 8 17 10 27 20'},+ {at: 0.8, expect: '13 2 23 12 29 18 15 4 21 10 31 20'},+ {at: 1, expect: '15 0 25 10 35 20 15 0 25 10 35 20'},+ {at: 1.2, expect: '17 0 27 8 41 22 15 0 29 10 39 20'},+]);++// One list has odd length+test_composition({+ property: 'stroke-dasharray',+ underlying: '10 20',+ replaceFrom: '5 10 15',+ addTo: '10 5 20 15',+}, [+ {at: -0.2, expect: ' 4 11 14 3 10 17 2 9 16 5 8 15'},+ {at: 0, expect: ' 5 10 15 5 10 15 5 10 15 5 10 15'},+ {at: 0.2, expect: ' 6 9 16 7 10 13 8 11 14 5 12 15'},+ {at: 0.4, expect: ' 7 8 17 9 10 11 11 12 13 5 14 15'},+ {at: 0.6, expect: ' 8 7 18 11 10 9 14 13 12 5 16 15'},+ {at: 0.8, expect: ' 9 6 19 13 10 7 17 14 11 5 18 15'},+ {at: 1, expect: '10 5 20 15 10 5 20 15 10 5 20 15'},+ {at: 1.2, expect: '11 4 21 17 10 3 23 16 9 5 22 15'},+]);++// Both lists have odd length+test_composition({+ property: 'stroke-dasharray',+ underlying: '5',+ addFrom: '0 5 10',+ addTo: '15 20 25 30 35',+}, [+ {at: -0.2, expect: ' 0 2 7 0 0 9 0 1 6 0 3 8 0 0 5'}, // Values must be non-negative.+ {at: 0, expect: ' 0 5 10 0 5 10 0 5 10 0 5 10 0 5 10'},+ {at: 0.2, expect: ' 3 8 13 6 11 11 4 9 14 7 7 12 5 10 15'},+ {at: 0.4, expect: ' 6 11 16 12 17 12 8 13 18 14 9 14 10 15 20'},+ {at: 0.6, expect: ' 9 14 19 18 23 13 12 17 22 21 11 16 15 20 25'},+ {at: 0.8, expect: '12 17 22 24 29 14 16 21 26 28 13 18 20 25 30'},+ {at: 1, expect: '15 20 25 30 35 15 20 25 30 35 15 20 25 30 35'},+ {at: 1.2, expect: '18 23 28 36 41 16 24 29 34 42 17 22 30 35 40'},+]);++// Mixed units+test_composition({+ property: 'stroke-dasharray',+ underlying: '1em',+ addFrom: '9em 14px',+ addTo: '304px 1.5em',+}, [+ {at: -0.2, expect: '7em 12px'},+ {at: 0, expect: '9em 14px'},+ {at: 0.2, expect: '11em 16px'},+ {at: 0.4, expect: '13em 18px'},+ {at: 0.6, expect: '15em 20px'},+ {at: 0.8, expect: '17em 22px'},+ {at: 1, expect: '19em 24px'},+ {at: 1.2, expect: '21em 26px'},+]);+</script>+</body>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/resources/svg-tags.js b/Tests/LibWeb/Text/input/wpt-import/svg/resources/svg-tags.jsnew file mode 100644index 00000000000..70521f5ba9a--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/resources/svg-tags.js@@ -0,0 +1,67 @@+'use strict';++const SVG_NS = 'http://www.w3.org/2000/svg';++const SVG_ELEMENT_TAGS = [+ 'svg',+ 'g',+ 'defs',+ 'desc',+ 'title',+ 'symbol',+ 'use',+ 'image',+ 'switch',+ 'style',+ 'path',+ 'rect',+ 'circle',+ 'ellipse',+ 'line',+ 'polyline',+ 'polygon',+ 'text',+ 'tspan',+ 'textPath',+ 'marker',+ 'linearGradient',+ 'radialGradient',+ 'stop',+ 'pattern',+ 'clipPath',+ 'mask',+ 'a',+ 'view',+ 'script',+ 'animate',+ 'set',+ 'animateMotion',+ 'mpath',+ 'animateTransform',+ 'metadata',+ 'foreignObject',+ 'filter',+ 'feBlend',+ 'feColorMatrix',+ 'feComponentTransfer',+ 'feFuncR',+ 'feFuncG',+ 'feFuncB',+ 'feFuncA',+ 'feComposite',+ 'feConvolveMatrix',+ 'feDiffuseLighting',+ 'fePointLight',+ 'feSpotLight',+ 'feDisplacementMap',+ 'feDropShadow',+ 'feFlood',+ 'feGaussianBlur',+ 'feImage',+ 'feMerge',+ 'feMergeNode',+ 'feMorphology',+ 'feSpecularLighting',+ 'feTile',+ 'feTurbulence'+];diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/struct/systemLanguage-matching.html b/Tests/LibWeb/Text/input/wpt-import/svg/struct/systemLanguage-matching.htmlnew file mode 100644index 00000000000..8c07d208360--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/struct/systemLanguage-matching.html@@ -0,0 +1,121 @@+<!DOCTYPE html>+<title>systemLanguage attribute matching per BCP 47 basic filtering</title>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/struct.html#ConditionalProcessingSystemLanguageAttribute">+<link rel="help" href="https://www.rfc-editor.org/rfc/rfc4647#section-3.3.1">+<meta name="assert" content="The systemLanguage attribute evaluates to true if any user preferred language matches any listed tag per BCP 47 basic filtering.">+<script src="../../resources/testharness.js"></script>+<script src="../../resources/testharnessreport.js"></script>+<svg id="svg" width="400" height="400" style="position: absolute; top: -9999px;">+</svg>+<script>+const svgNS = "http://www.w3.org/2000/svg";+const svg = document.getElementById("svg");+const userLang = navigator.language;++function isRendered(el) {+ const bbox = el.getBoundingClientRect();+ return bbox.width > 0 && bbox.height > 0;+}++function createRect(systemLanguage) {+ const rect = document.createElementNS(svgNS, "rect");+ rect.setAttribute("width", "10");+ rect.setAttribute("height", "10");+ if (systemLanguage !== null)+ rect.setAttribute("systemLanguage", systemLanguage);+ svg.appendChild(rect);+ return rect;+}++function createSwitchWithRects(langList) {+ const sw = document.createElementNS(svgNS, "switch");+ const rects = [];+ for (const lang of langList) {+ const rect = document.createElementNS(svgNS, "rect");+ rect.setAttribute("width", "10");+ rect.setAttribute("height", "10");+ if (lang !== null)+ rect.setAttribute("systemLanguage", lang);+ sw.appendChild(rect);+ rects.push(rect);+ }+ svg.appendChild(sw);+ return rects;+}++test(() => {+ const el = createRect(userLang);+ assert_true(isRendered(el), `systemLanguage="${userLang}" should match user language "${userLang}"`);+}, "Exact match with navigator.language renders the element");++test(() => {+ const el = createRect(userLang.toUpperCase());+ assert_true(isRendered(el), `systemLanguage="${userLang.toUpperCase()}" should match "${userLang}" case-insensitively`);+}, "Case-insensitive exact match renders the element");++test(() => {+ const el = createRect("x-nonexistent");+ assert_false(isRendered(el), `systemLanguage="x-nonexistent" should not match`);+}, "Non-matching language tag does not render");++test(() => {+ const el = createRect("");+ assert_false(isRendered(el), `systemLanguage="" should evaluate to false`);+}, "Empty systemLanguage evaluates to false");++test(() => {+ const el = createRect(null);+ assert_true(isRendered(el), "Element without systemLanguage should render");+}, "Absent systemLanguage evaluates to true");++test(() => {+ const el = createRect(userLang + ", x-nonexistent");+ assert_true(isRendered(el), `systemLanguage="${userLang}, x-nonexistent" should match`);+}, "Comma-separated list with matching tag first renders");++test(() => {+ const el = createRect("x-nonexistent, " + userLang);+ assert_true(isRendered(el), `systemLanguage="x-nonexistent, ${userLang}" should match`);+}, "Comma-separated list with matching tag second renders");++test(() => {+ const el = createRect("x-aa, x-bb, " + userLang + ", x-cc");+ assert_true(isRendered(el), "Any matching tag in a list should suffice");+}, "Comma-separated list with matching tag in the middle renders");++test(() => {+ const el = createRect("x-aa, x-bb, x-cc");+ assert_false(isRendered(el), "No matching tag in list");+}, "Comma-separated list with no matching tag does not render");++test(() => {+ const el = createRect(userLang + "-subtag");+ assert_true(isRendered(el),+ `User language "${userLang}" should prefix-match "${userLang}-subtag"`);+}, "BCP 47 prefix matching: user language prefix matches listed tag with extra subtag");++test(() => {+ const rects = createSwitchWithRects([userLang, "x-nonexistent"]);+ assert_true(isRendered(rects[0]), "First matching child should render");+ assert_false(isRendered(rects[1]), "Second child should not render");+}, "switch element: first matching child renders, others do not");++test(() => {+ const rects = createSwitchWithRects(["x-nonexistent", userLang]);+ assert_false(isRendered(rects[0]), "Non-matching first child should not render");+ assert_true(isRendered(rects[1]), "Matching second child should render");+}, "switch element: skips non-matching, renders first match");++test(() => {+ const rects = createSwitchWithRects(["x-aa", "x-bb", null]);+ assert_false(isRendered(rects[0]), "Non-matching first child");+ assert_false(isRendered(rects[1]), "Non-matching second child");+ assert_true(isRendered(rects[2]), "Fallback child without systemLanguage renders");+}, "switch element: fallback child without systemLanguage renders when no match");++test(() => {+ const rects = createSwitchWithRects(["x-aa", "x-bb"]);+ assert_false(isRendered(rects[0]), "Non-matching first child");+ assert_false(isRendered(rects[1]), "Non-matching second child");+}, "switch element: nothing renders when no child matches and no fallback");+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/struct/systemLanguage-parsing.html b/Tests/LibWeb/Text/input/wpt-import/svg/struct/systemLanguage-parsing.htmlnew file mode 100644index 00000000000..b5138dca885--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/struct/systemLanguage-parsing.html@@ -0,0 +1,84 @@+<!DOCTYPE html>+<title>systemLanguage attribute is parsed as comma-separated tokens</title>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/struct.html#ConditionalProcessingSystemLanguageAttribute">+<link rel="help" href="https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#set-of-comma-separated-tokens">+<meta name="assert" content="The systemLanguage attribute value is a set of comma-separated tokens per SVG2. Each token is trimmed of surrounding ASCII whitespace.">+<script src="../../resources/testharness.js"></script>+<script src="../../resources/testharnessreport.js"></script>+<script>+function parsesAs(input, expected, description) {+ test(() => {+ const el = document.createElementNS("http://www.w3.org/2000/svg", "text");+ el.setAttribute("systemLanguage", input);+ const list = el.systemLanguage;+ assert_equals(list.length, expected.length, "token count");+ for (let i = 0; i < expected.length; i++)+ assert_equals(list.getItem(i), expected[i], `token ${i}`);+ }, description);+}++// SVG2: "The value is a set of comma-separated tokens, each of which must be+// a Language-Tag value, as defined in BCP 47."+//+// HTML: "A set of comma-separated tokens is a string containing zero or more+// tokens each separated from the next by a single U+002C COMMA character (,),+// where tokens consist of any string of zero or more characters, neither+// beginning nor ending with ASCII whitespace, nor containing any U+002C COMMA+// characters (,), and optionally surrounded by ASCII whitespace."++parsesAs("en,fr,de", ["en", "fr", "de"],+ "Comma-separated tokens are split into individual items");++parsesAs("en, fr, de", ["en", "fr", "de"],+ "Whitespace after comma is stripped");++parsesAs("en ,fr ,de", ["en", "fr", "de"],+ "Whitespace before comma is stripped");++parsesAs("en , fr , de", ["en", "fr", "de"],+ "Whitespace around commas is stripped");++parsesAs(" en, fr ", ["en", "fr"],+ "Leading and trailing whitespace on the value is stripped");++parsesAs(" \t\nen, fr\t\n ", ["en", "fr"],+ "Tabs and newlines as leading/trailing whitespace are stripped");++parsesAs("en", ["en"],+ "Single token without commas");++// "each of which must be a Language-Tag value, as defined in BCP 47"+// BCP 47 tags use hyphens for subtags (e.g. "en-US", "zh-Hans").+// Hyphens are not separators — only commas are.+parsesAs("en-US, zh-Hans, pt-BR", ["en-US", "zh-Hans", "pt-BR"],+ "BCP 47 subtags are preserved within tokens");++// Edge cases: the parser does not validate token content.+// Invalid BCP 47 tags are stored as-is. They simply won't match+// any user language, so the element won't render.++// Double comma — per the HTML comma-separated token spec, the empty+// string between consecutive commas is a valid token.+// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#set-of-comma-separated-tokens+// Example from spec: " a ,b,,d d " → ["a", "b", "", "d d"]+parsesAs("en,,fr", ["en", "", "fr"],+ "Double comma produces an empty token between the two commas");++// "zero or more tokens" — an empty string yields an empty list.+// SVG2: "If a null string or empty string value is given to attribute+// 'systemLanguage', the attribute evaluates to 'false'."+parsesAs("", [""],+ "Empty string results in a single empty token");++// A lone comma separates two empty tokens per the HTML spec.+parsesAs(",", ["", ""],+ "A single comma separates two empty tokens");++// Numeric strings are not valid BCP 47 tags but are stored as tokens.+parsesAs("123, 456", ["123", "456"],+ "Numeric tokens are parsed without validation");++// Arbitrary invalid strings are stored as tokens without validation.+parsesAs("not-a-lang, ???, @#$", ["not-a-lang", "???", "@#$"],+ "Invalid language tags are stored as tokens without validation");+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/styling/svg-element-attributeStyleMap.html b/Tests/LibWeb/Text/input/wpt-import/svg/styling/svg-element-attributeStyleMap.htmlnew file mode 100644index 00000000000..41b09df37bf--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/styling/svg-element-attributeStyleMap.html@@ -0,0 +1,63 @@+<!doctype html>+<meta charset="utf-8">+<title>SVGElement attributeStyleMap and StylePropertyMap Read/Write Tests</title>+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-elementcssinlinestyle-attributestylemap">+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#stylepropertymap">+<script src="../../resources/testharness.js"></script>+<script src="../../resources/testharnessreport.js"></script>+<script src="../../svg/resources/svg-tags.js"></script>++<body>+ <div id="svg-container"></div>++ <script>+ function createSVGElement(tag) {+ const container = document.getElementById('svg-container');+ const el = document.createElementNS(SVG_NS, tag);+ container.appendChild(el);+ return el;+ }++ // Test Read, Write, Delete, and Sync Operations Across ALL SVG Elements+ for (const tag of SVG_ELEMENT_TAGS) {+ test(t => {+ const element = createSVGElement(tag);+ assert_true(!!element, `SVG element <${tag}> should be created successfully`);++ const styleMap = element.attributeStyleMap;++ assert_true(!!styleMap, `attributeStyleMap should return a non-null object on <${tag}>`);+ assert_true(+ styleMap instanceof StylePropertyMap,+ `attributeStyleMap should be an instance of StylePropertyMap on <${tag}>`+ );++ // 1. set() operations using standard CSS properties & keywords+ styleMap.set('opacity', '0.5');+ styleMap.set('cursor', new CSSKeywordValue('pointer'));++ // 2. has() and get() assertions+ assert_true(styleMap.has('opacity'), `styleMap.has('opacity') should return true on <${tag}>`);+ assert_equals(styleMap.get('opacity').toString(), '0.5', `styleMap.get 'opacity' should match the value previously set on <${tag}>`);+ assert_equals(styleMap.get('cursor').value, 'pointer', `styleMap.get 'cursor' should match the value previously set on <${tag}>`);++ // 3. Synchronization with DOM CSSStyleDeclaration (element.style)+ assert_equals(element.style.opacity, '0.5', `Inline style 'opacity' should match the value previously set on <${tag}>`);+ assert_equals(element.style.cursor, 'pointer', `Inline style 'cursor' should match the value previously set on <${tag}>`);++ // 4. delete() operation+ styleMap.delete('opacity');+ assert_false(styleMap.has('opacity'), `styleMap.has('opacity') should return false after delete() on <${tag}>`);+ assert_equals(element.style.opacity, '', `Inline style 'opacity' should be cleared after delete() on <${tag}>`);+ assert_equals(element.style.cursor, 'pointer', `Inline style 'cursor' should stay unchanged after delete() on <${tag}>`);++ // 5. clear() operation+ styleMap.clear();+ assert_equals(styleMap.size, 0, `styleMap.size should be 0 after clear() on <${tag}>`);+ assert_equals(element.style.cursor, '', `Inline style 'cursor' should be empty after clear() on <${tag}>`);++ }, `attributeStyleMap set, get, has, delete, and clear sync correctly on <${tag}>`);+ }++ </script>+</body>\ No newline at end of filediff --git a/Tests/LibWeb/Text/input/wpt-import/svg/text/scripted/getrotationofchar.html b/Tests/LibWeb/Text/input/wpt-import/svg/text/scripted/getrotationofchar.htmlnew file mode 100644index 00000000000..120ba7f7139--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/text/scripted/getrotationofchar.html@@ -0,0 +1,84 @@+<!DOCTYPE html>+<meta charset="utf-8">+<title>SVGTextContentElement.getRotationOfChar</title>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/text.html#__svg__SVGTextContentElement__getRotationOfChar">+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<svg id="container" width="800" height="300"></svg>+<script>+function createSVGElement(localPart, attributes, textOrElement) {+ const element = document.createElementNS('http://www.w3.org/2000/svg', localPart);+ for (let name in attributes) {+ element.setAttribute(name, attributes[name]);+ }+ if (typeof(textOrElement) == 'string')+ element.textContent = textOrElement;+ else if (textOrElement instanceof Element)+ element.appendChild(textOrElement);+ else if (textOrElement !== undefined)+ throw new TypeError('The third argument should be a string or an Element');+ return element;+}++function normalize(rotation) {+ return rotation - 360 * Math.floor(rotation / 360);+}++function normalizedRotation(element, index) {+ return normalize(element.getRotationOfChar(index));+}++const container = document.querySelector('#container');+['horizontal-tb', 'vertical-rl', 'vertical-lr', 'sideways-rl', 'sideways-lr'].forEach(mode => {+ const isHorizontal = mode == 'horizontal-tb';+ const isVertical = mode == 'vertical-rl' || mode == 'vertical-lr';+ const sidewaysDelta = 90 * ((mode == 'sideways-rl') - (mode == 'sideways-lr'));+ container.style.writingMode = mode;++ test(() => {+ container.style.textOrientation = 'mixed';+ const element = container.appendChild(createSVGElement('text', {}, ' M月X'));+ assert_equals(element.getRotationOfChar(0), isVertical ? 90 : sidewaysDelta, 'M');+ assert_equals(element.getRotationOfChar(1), sidewaysDelta, '月');+ assert_equals(element.getRotationOfChar(2), isVertical ? 90 : sidewaysDelta, 'X');+ }, `'text-orientation: mixed' - ${mode}`);++ test(() => {+ container.style.textOrientation = 'upright';+ const element = container.appendChild(createSVGElement('text', {}, 'T火'));+ assert_equals(element.getRotationOfChar(0), sidewaysDelta, 'T');+ assert_equals(element.getRotationOfChar(1), sidewaysDelta, '火');+ }, `'text-orientation: upright' - ${mode}`);++ test(() => {+ container.style.textOrientation = 'sideways';+ const element = container.appendChild(createSVGElement('text', {}, 'W水'));+ assert_equals(element.getRotationOfChar(0), isVertical ? 90 : sidewaysDelta, 'W');+ assert_equals(element.getRotationOfChar(1), isVertical ? 90 : sidewaysDelta, '水');+ }, `'text-orientation: sideways' - ${mode}`);++ test(() => {+ container.style.textOrientation = 'mixed';+ const element = container.appendChild(+ createSVGElement('text', {rotate: '0 180.5 360 365 -10'}, 't木cde'));+ const shift = isHorizontal ? 0 : 90 * (mode == 'sideways-rl' || isVertical) + 270 * (mode == 'sideways-lr');+ assert_equals(normalizedRotation(element, 0), 0 + shift, 't');+ assert_equals(normalizedRotation(element, 1), 180.5 + sidewaysDelta, '木');+ assert_equals(normalizedRotation(element, 2), 0 + shift, 'c');+ assert_equals(normalizedRotation(element, 3), 5 + shift, 'd');+ assert_equals(normalizedRotation(element, 4), normalize(350 + shift), 'e');+ }, `Rotation attribute - ${mode}`);++ test(() => {+ container.style.textOrientation = 'mixed';+ container.appendChild(createSVGElement('path', {id: 'path1', d: 'M 40 40 L 200 200'}));+ const element = container.appendChild(+ createSVGElement('text', {rotate: '0 0 25'},+ createSVGElement('textPath', {href: '#path1'}, 'F金r')));+ const shift = (mode == 'sideways-lr') ? 180 : 0;+ assert_equals(normalizedRotation(element, 0), 45 + shift, 'F');+ assert_equals(normalizedRotation(element, 1), isVertical ? 315 : 45 + shift, '金');+ assert_equals(normalizedRotation(element, 2), 45 + 25 + shift, 'r');+ }, `<textPath> - ${mode}`);+});+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-initial-values.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-initial-values.htmlnew file mode 100644index 00000000000..111299e9048--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-initial-values.html@@ -0,0 +1,51 @@+<!DOCTYPE html>+<title>SVGAnimatedEnumeration, initial values</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<script src="support/initial-value-helper.js"></script>+<script>+assert_initial_values([+ { interface: 'SVGClipPathElement', attributes: [ 'clipPathUnits' ],+ clipPathUnits: { initial: SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE, valid: 'objectBoundingBox' } },+ { interface: 'SVGComponentTransferFunctionElement', attributes: [ 'type' ],+ type: { initial: SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY, valid: 'table' } },+ { interface: 'SVGFEBlendElement', attributes: [ 'mode' ],+ mode: { initial: SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL, valid: 'screen' } },+ { interface: 'SVGFEColorMatrixElement', attributes: [ 'type' ],+ type: { initial: SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX, valid: 'saturate' } },+ { interface: 'SVGFECompositeElement', attributes: [ 'operator' ],+ operator: { initial: SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER, valid: 'in' } },+ { interface: 'SVGFEConvolveMatrixElement', attributes: [ 'edgeMode' ],+ edgeMode: { initial: SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE, valid: 'wrap' } },+ { interface: 'SVGFEDisplacementMapElement', attributes: [ 'xChannelSelector', 'yChannelSelector' ],+ xChannelSelector: { initial: SVGFEDisplacementMapElement.SVG_CHANNEL_A, valid: 'R' },+ yChannelSelector: { initial: SVGFEDisplacementMapElement.SVG_CHANNEL_A, valid: 'G' } },+ { interface: 'SVGFEGaussianBlurElement', attributes: [ 'edgeMode' ],+ edgeMode: { initial: SVGFEGaussianBlurElement.SVG_EDGEMODE_NONE, valid: 'wrap' } },+ { interface: 'SVGFEMorphologyElement', attributes: [ 'operator' ],+ operator: { initial: SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE, valid: 'dilate' } },+ { interface: 'SVGFETurbulenceElement', attributes: [ 'stitchTiles', 'type' ],+ stitchTiles: { initial: SVGFETurbulenceElement.SVG_STITCHTYPE_NOSTITCH, valid: 'stitch' },+ type: { initial: SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_TURBULENCE, valid: 'fractalNoise' } },+ { interface: 'SVGFilterElement', attributes: [ 'filterUnits', 'primitiveUnits' ],+ filterUnits: { initial: SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, valid: 'userSpaceOnUse' },+ primitiveUnits: { initial: SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE, valid: 'objectBoundingBox' } },+ { interface: 'SVGGradientElement', attributes: [ 'gradientUnits', 'spreadMethod' ],+ gradientUnits: { initial: SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, valid: 'userSpaceOnUse' },+ spreadMethod: { initial: SVGGradientElement.SVG_SPREADMETHOD_PAD, valid: 'repeat' } },+ { interface: 'SVGMarkerElement', attributes: [ 'markerUnits', 'orientType' ],+ markerUnits: { initial: SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH, valid: 'userSpaceOnUse' },+ orientType: { initial: SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE, valid: 'auto' } },+ { interface: 'SVGMaskElement', attributes: [ 'maskUnits', 'maskContentUnits' ],+ maskUnits: { initial: SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, valid: 'userSpaceOnUse' },+ maskContentUnits: { initial: SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE, valid: 'objectBoundingBox' } },+ { interface: 'SVGPatternElement', attributes: [ 'patternUnits', 'patternContentUnits' ],+ patternUnits: { initial: SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, valid: 'userSpaceOnUse' },+ patternContentUnits: { initial: SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE, valid: 'objectBoundingBox' } },+ { interface: 'SVGTextContentElement', attributes: [ 'lengthAdjust' ],+ lengthAdjust: { initial: SVGTextContentElement.LENGTHADJUST_SPACING, valid: 'spacingAndGlyphs' } },+ { interface: 'SVGTextPathElement', attributes: [ 'method', 'spacing' ],+ method: { initial: SVGTextPathElement.TEXTPATH_METHODTYPE_ALIGN, valid: 'stretch' },+ spacing: { initial: SVGTextPathElement.TEXTPATH_SPACINGTYPE_EXACT, valid: 'auto' } },+], { mapProperty: { orientType: 'orient' } });+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-invalid-values.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-invalid-values.htmlnew file mode 100644index 00000000000..49b3a9bb569--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-invalid-values.html@@ -0,0 +1,107 @@+<!DOCTYPE html>+<title>SVGAnimatedEnumeration, invalid values</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<script>+// Enumerated attributes revert to their initial value when the attribute value does not+// match the grammar in the attribute definition table, while the content attribute keeps+// whatever was specified. https://w3c.github.io/svgwg/svg2-draft/types.html#InvalidValues+const attributes = [+ { interface: 'SVGClipPathElement', element: 'clipPath', attribute: 'clipPathUnits',+ initial: () => SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE, valid: 'objectBoundingBox' },+ { interface: 'SVGComponentTransferFunctionElement', element: 'feFuncA', attribute: 'type',+ initial: () => SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY, valid: 'table' },+ { interface: 'SVGFEBlendElement', element: 'feBlend', attribute: 'mode',+ initial: () => SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL, valid: 'screen' },+ { interface: 'SVGFEColorMatrixElement', element: 'feColorMatrix', attribute: 'type',+ initial: () => SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX, valid: 'saturate' },+ { interface: 'SVGFECompositeElement', element: 'feComposite', attribute: 'operator',+ initial: () => SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER, valid: 'in' },+ { interface: 'SVGFEConvolveMatrixElement', element: 'feConvolveMatrix', attribute: 'edgeMode',+ initial: () => SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE, valid: 'wrap' },+ { interface: 'SVGFEDisplacementMapElement', element: 'feDisplacementMap', attribute: 'xChannelSelector',+ initial: () => SVGFEDisplacementMapElement.SVG_CHANNEL_A, valid: 'R' },+ { interface: 'SVGFEDisplacementMapElement', element: 'feDisplacementMap', attribute: 'yChannelSelector',+ initial: () => SVGFEDisplacementMapElement.SVG_CHANNEL_A, valid: 'G' },+ { interface: 'SVGFEGaussianBlurElement', element: 'feGaussianBlur', attribute: 'edgeMode',+ initial: () => SVGFEGaussianBlurElement.SVG_EDGEMODE_NONE, valid: 'wrap' },+ { interface: 'SVGFEMorphologyElement', element: 'feMorphology', attribute: 'operator',+ initial: () => SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE, valid: 'dilate' },+ { interface: 'SVGFETurbulenceElement', element: 'feTurbulence', attribute: 'stitchTiles',+ initial: () => SVGFETurbulenceElement.SVG_STITCHTYPE_NOSTITCH, valid: 'stitch' },+ { interface: 'SVGFETurbulenceElement', element: 'feTurbulence', attribute: 'type',+ initial: () => SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_TURBULENCE, valid: 'fractalNoise' },+ { interface: 'SVGFilterElement', element: 'filter', attribute: 'filterUnits',+ initial: () => SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, valid: 'userSpaceOnUse' },+ { interface: 'SVGFilterElement', element: 'filter', attribute: 'primitiveUnits',+ initial: () => SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE, valid: 'objectBoundingBox' },+ { interface: 'SVGGradientElement', element: 'linearGradient', attribute: 'gradientUnits',+ initial: () => SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, valid: 'userSpaceOnUse' },+ { interface: 'SVGGradientElement', element: 'linearGradient', attribute: 'spreadMethod',+ initial: () => SVGGradientElement.SVG_SPREADMETHOD_PAD, valid: 'repeat' },+ { interface: 'SVGMarkerElement', element: 'marker', attribute: 'markerUnits',+ initial: () => SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH, valid: 'userSpaceOnUse' },+ { interface: 'SVGMarkerElement', element: 'marker', attribute: 'orientType', contentAttribute: 'orient',+ initial: () => SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE, valid: 'auto' },+ { interface: 'SVGMaskElement', element: 'mask', attribute: 'maskUnits',+ initial: () => SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, valid: 'userSpaceOnUse' },+ { interface: 'SVGMaskElement', element: 'mask', attribute: 'maskContentUnits',+ initial: () => SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE, valid: 'objectBoundingBox' },+ { interface: 'SVGPatternElement', element: 'pattern', attribute: 'patternUnits',+ initial: () => SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, valid: 'userSpaceOnUse' },+ { interface: 'SVGPatternElement', element: 'pattern', attribute: 'patternContentUnits',+ initial: () => SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE, valid: 'objectBoundingBox' },+ { interface: 'SVGTextContentElement', element: 'text', attribute: 'lengthAdjust',+ initial: () => SVGTextContentElement.LENGTHADJUST_SPACING, valid: 'spacingAndGlyphs' },+ { interface: 'SVGTextPathElement', element: 'textPath', attribute: 'method',+ initial: () => SVGTextPathElement.TEXTPATH_METHODTYPE_ALIGN, valid: 'stretch' },+ { interface: 'SVGTextPathElement', element: 'textPath', attribute: 'spacing',+ initial: () => SVGTextPathElement.TEXTPATH_SPACINGTYPE_EXACT, valid: 'auto' },+];++function create(info) {+ return document.createElementNS('http://www.w3.org/2000/svg', info.element);+}++for (let info of attributes) {+ let contentAttribute = info.contentAttribute || info.attribute;+ let label = document.title + ', ' + info.interface + '.prototype.' + info.attribute;++ test(function() {+ let e = create(info);+ let initial = info.initial();+ assert_equals(e[info.attribute].baseVal, initial, 'initial before');+ e.setAttribute(contentAttribute, info.valid);+ assert_not_equals(e[info.attribute].baseVal, initial, 'new value');+ e.setAttribute(contentAttribute, '');+ assert_equals(e[info.attribute].baseVal, initial, 'initial after');+ }, label + ' (empty string)');++ test(function() {+ let e = create(info);+ let initial = info.initial();+ e.setAttribute(contentAttribute, info.valid);+ assert_not_equals(e[info.attribute].baseVal, initial, 'new value');+ e.setAttribute(contentAttribute, 'foobar');+ assert_equals(e[info.attribute].baseVal, initial, 'initial after');+ assert_equals(e.getAttribute(contentAttribute), 'foobar', 'content attribute');+ }, label + ' (content attribute is not rewritten)');+}++// feBlend's mode is <blend-mode>, which is the 16 keywords of "Compositing and Blending Level 1"+// and does not include plus-darker or plus-lighter. Those two are worth their own subtest because+// they are not arbitrary garbage: an implementation sharing one blend-mode parser with CSS can+// accept them here without noticing they are outside the grammar of this attribute.+// https://drafts.csswg.org/filter-effects-1/#feBlendElement+// https://drafts.csswg.org/compositing-1/#ltblendmodegt+for (let keyword of ['plus-darker', 'plus-lighter']) {+ test(function() {+ let e = document.createElementNS('http://www.w3.org/2000/svg', 'feBlend');+ e.setAttribute('mode', 'screen');+ assert_equals(e.mode.baseVal, SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN, 'new value');+ e.setAttribute('mode', keyword);+ assert_equals(e.mode.baseVal, SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL, 'initial after');+ assert_equals(e.getAttribute('mode'), keyword, 'content attribute');+ }, document.title + ', SVGFEBlendElement.prototype.mode (' + keyword + ' is not a blend mode)');+}+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-keywords.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-keywords.htmlnew file mode 100644index 00000000000..88a56203859--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedEnumeration-keywords.html@@ -0,0 +1,175 @@+<!DOCTYPE html>+<title>SVGAnimatedEnumeration, keyword values</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<script>+// Enumerated attribute values are matched literally against the keywords in the attribute's+// grammar. A value differing only by case does not match, so the attribute is treated as having+// its initial value. https://w3c.github.io/svgwg/svg2-draft/types.html#InvalidValues+const enumerations = [+ { interface: 'SVGComponentTransferFunctionElement', element: 'feFuncA', attribute: 'type',+ initial: 'SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY',+ keywords: {+ 'identity': 'SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY',+ 'table': 'SVG_FECOMPONENTTRANSFER_TYPE_TABLE',+ 'discrete': 'SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE',+ 'linear': 'SVG_FECOMPONENTTRANSFER_TYPE_LINEAR',+ 'gamma': 'SVG_FECOMPONENTTRANSFER_TYPE_GAMMA',+ } },+ { interface: 'SVGFEBlendElement', element: 'feBlend', attribute: 'mode',+ initial: 'SVG_FEBLEND_MODE_NORMAL',+ keywords: {+ 'normal': 'SVG_FEBLEND_MODE_NORMAL',+ 'multiply': 'SVG_FEBLEND_MODE_MULTIPLY',+ 'screen': 'SVG_FEBLEND_MODE_SCREEN',+ 'darken': 'SVG_FEBLEND_MODE_DARKEN',+ 'lighten': 'SVG_FEBLEND_MODE_LIGHTEN',+ 'overlay': 'SVG_FEBLEND_MODE_OVERLAY',+ 'color-dodge': 'SVG_FEBLEND_MODE_COLOR_DODGE',+ 'color-burn': 'SVG_FEBLEND_MODE_COLOR_BURN',+ 'hard-light': 'SVG_FEBLEND_MODE_HARD_LIGHT',+ 'soft-light': 'SVG_FEBLEND_MODE_SOFT_LIGHT',+ 'difference': 'SVG_FEBLEND_MODE_DIFFERENCE',+ 'exclusion': 'SVG_FEBLEND_MODE_EXCLUSION',+ 'hue': 'SVG_FEBLEND_MODE_HUE',+ 'saturation': 'SVG_FEBLEND_MODE_SATURATION',+ 'color': 'SVG_FEBLEND_MODE_COLOR',+ 'luminosity': 'SVG_FEBLEND_MODE_LUMINOSITY',+ } },+ { interface: 'SVGFEColorMatrixElement', element: 'feColorMatrix', attribute: 'type',+ initial: 'SVG_FECOLORMATRIX_TYPE_MATRIX',+ keywords: {+ 'matrix': 'SVG_FECOLORMATRIX_TYPE_MATRIX',+ 'saturate': 'SVG_FECOLORMATRIX_TYPE_SATURATE',+ 'hueRotate': 'SVG_FECOLORMATRIX_TYPE_HUEROTATE',+ 'luminanceToAlpha': 'SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA',+ } },+ { interface: 'SVGFECompositeElement', element: 'feComposite', attribute: 'operator',+ initial: 'SVG_FECOMPOSITE_OPERATOR_OVER',+ keywords: {+ 'over': 'SVG_FECOMPOSITE_OPERATOR_OVER',+ 'in': 'SVG_FECOMPOSITE_OPERATOR_IN',+ 'out': 'SVG_FECOMPOSITE_OPERATOR_OUT',+ 'atop': 'SVG_FECOMPOSITE_OPERATOR_ATOP',+ 'xor': 'SVG_FECOMPOSITE_OPERATOR_XOR',+ 'arithmetic': 'SVG_FECOMPOSITE_OPERATOR_ARITHMETIC',+ } },+ { interface: 'SVGFEConvolveMatrixElement', element: 'feConvolveMatrix', attribute: 'edgeMode',+ initial: 'SVG_EDGEMODE_DUPLICATE',+ keywords: {+ 'duplicate': 'SVG_EDGEMODE_DUPLICATE',+ 'wrap': 'SVG_EDGEMODE_WRAP',+ 'none': 'SVG_EDGEMODE_NONE',+ } },+ { interface: 'SVGFEDisplacementMapElement', element: 'feDisplacementMap', attribute: 'xChannelSelector',+ initial: 'SVG_CHANNEL_A',+ keywords: {+ 'R': 'SVG_CHANNEL_R',+ 'G': 'SVG_CHANNEL_G',+ 'B': 'SVG_CHANNEL_B',+ 'A': 'SVG_CHANNEL_A',+ } },+ { interface: 'SVGFEGaussianBlurElement', element: 'feGaussianBlur', attribute: 'edgeMode',+ initial: 'SVG_EDGEMODE_NONE',+ keywords: {+ 'duplicate': 'SVG_EDGEMODE_DUPLICATE',+ 'wrap': 'SVG_EDGEMODE_WRAP',+ 'none': 'SVG_EDGEMODE_NONE',+ } },+ { interface: 'SVGFEMorphologyElement', element: 'feMorphology', attribute: 'operator',+ initial: 'SVG_MORPHOLOGY_OPERATOR_ERODE',+ keywords: {+ 'erode': 'SVG_MORPHOLOGY_OPERATOR_ERODE',+ 'dilate': 'SVG_MORPHOLOGY_OPERATOR_DILATE',+ } },+ { interface: 'SVGFETurbulenceElement', element: 'feTurbulence', attribute: 'type',+ initial: 'SVG_TURBULENCE_TYPE_TURBULENCE',+ keywords: {+ 'fractalNoise': 'SVG_TURBULENCE_TYPE_FRACTALNOISE',+ 'turbulence': 'SVG_TURBULENCE_TYPE_TURBULENCE',+ } },+ { interface: 'SVGFETurbulenceElement', element: 'feTurbulence', attribute: 'stitchTiles',+ initial: 'SVG_STITCHTYPE_NOSTITCH',+ keywords: {+ 'stitch': 'SVG_STITCHTYPE_STITCH',+ 'noStitch': 'SVG_STITCHTYPE_NOSTITCH',+ } },+ { interface: 'SVGGradientElement', element: 'linearGradient', attribute: 'spreadMethod',+ initial: 'SVG_SPREADMETHOD_PAD',+ keywords: {+ 'pad': 'SVG_SPREADMETHOD_PAD',+ 'reflect': 'SVG_SPREADMETHOD_REFLECT',+ 'repeat': 'SVG_SPREADMETHOD_REPEAT',+ } },+ { interface: 'SVGGradientElement', element: 'linearGradient', attribute: 'gradientUnits',+ constants: 'SVGUnitTypes', initial: 'SVG_UNIT_TYPE_OBJECTBOUNDINGBOX',+ keywords: {+ 'userSpaceOnUse': 'SVG_UNIT_TYPE_USERSPACEONUSE',+ 'objectBoundingBox': 'SVG_UNIT_TYPE_OBJECTBOUNDINGBOX',+ } },+ { interface: 'SVGMarkerElement', element: 'marker', attribute: 'markerUnits',+ initial: 'SVG_MARKERUNITS_STROKEWIDTH',+ keywords: {+ 'userSpaceOnUse': 'SVG_MARKERUNITS_USERSPACEONUSE',+ 'strokeWidth': 'SVG_MARKERUNITS_STROKEWIDTH',+ } },+ { interface: 'SVGTextContentElement', element: 'text', attribute: 'lengthAdjust',+ initial: 'LENGTHADJUST_SPACING',+ keywords: {+ 'spacing': 'LENGTHADJUST_SPACING',+ 'spacingAndGlyphs': 'LENGTHADJUST_SPACINGANDGLYPHS',+ } },+ { interface: 'SVGTextPathElement', element: 'textPath', attribute: 'method',+ initial: 'TEXTPATH_METHODTYPE_ALIGN',+ keywords: {+ 'align': 'TEXTPATH_METHODTYPE_ALIGN',+ 'stretch': 'TEXTPATH_METHODTYPE_STRETCH',+ } },+ { interface: 'SVGTextPathElement', element: 'textPath', attribute: 'spacing',+ initial: 'TEXTPATH_SPACINGTYPE_EXACT',+ keywords: {+ 'auto': 'TEXTPATH_SPACINGTYPE_AUTO',+ 'exact': 'TEXTPATH_SPACINGTYPE_EXACT',+ } },+];++function create(info) {+ return document.createElementNS('http://www.w3.org/2000/svg', info.element);+}++function constant(info, name) {+ return self[info.constants || info.interface][name];+}++function swapCase(keyword) {+ let swapped = keyword.toUpperCase();+ return swapped == keyword ? keyword.toLowerCase() : swapped;+}++for (let info of enumerations) {+ let label = document.title + ', ' + info.interface + '.prototype.' + info.attribute;++ test(function() {+ for (let keyword of Object.keys(info.keywords)) {+ let e = create(info);+ e.setAttribute(info.attribute, keyword);+ assert_equals(e[info.attribute].baseVal, constant(info, info.keywords[keyword]), keyword);+ }+ }, label + ' (keywords)');++ test(function() {+ // Set a keyword whose value differs from the initial first, so that reverting is observable.+ let keywords = Object.keys(info.keywords);+ let other = keywords.find(k => constant(info, info.keywords[k]) != constant(info, info.initial));+ for (let keyword of keywords) {+ let wrongCase = swapCase(keyword);+ let e = create(info);+ e.setAttribute(info.attribute, other);+ assert_not_equals(e[info.attribute].baseVal, constant(info, info.initial), other);+ e.setAttribute(info.attribute, wrongCase);+ assert_equals(e[info.attribute].baseVal, constant(info, info.initial), wrongCase);+ assert_equals(e.getAttribute(info.attribute), wrongCase, wrongCase + ' content attribute');+ }+ }, label + ' (case-sensitive)');+}+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedInteger-initial-values.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedInteger-initial-values.htmlnew file mode 100644index 00000000000..9ee63c344df--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedInteger-initial-values.html@@ -0,0 +1,20 @@+<!DOCTYPE html>+<title>SVGAnimatedInteger, initial values</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<script src="support/initial-value-helper.js"></script>+<script>+const propertyToContentAttribute = {+ orderX: 'order',+ orderY: 'order',+};++assert_initial_values([+ { interface: 'SVGFEConvolveMatrixElement',+ attributes: [ 'orderX', 'orderY', 'targetX', 'targetY' ],+ orderX: { initial: 3 }, orderY: { initial: 3 } },+ { interface: 'SVGFETurbulenceElement', attributes: [ 'numOctaves' ],+ numOctaves: { initial: 1 } },+], { initial: 0, valid: '42',+ mapProperty: propertyToContentAttribute });+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedNumber-initial-values.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedNumber-initial-values.htmlnew file mode 100644index 00000000000..4c24dff3b43--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedNumber-initial-values.html@@ -0,0 +1,49 @@+<!DOCTYPE html>+<title>SVGAnimatedNumber, initial values</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<script src="support/initial-value-helper.js"></script>+<script>+// Map from IDL attribute to content attribute:+const propertyToAttributeMap = {+ kernelUnitLengthX: 'kernelUnitLength',+ kernelUnitLengthY: 'kernelUnitLength',+ baseFrequencyX: 'baseFrequency',+ baseFrequencyY: 'baseFrequency',+ stdDeviationX: 'stdDeviation',+ stdDeviationY: 'stdDeviation',+ radiusX: 'radius',+ radiusY: 'radius',+};++assert_initial_values([+ { interface: 'SVGComponentTransferFunctionElement',+ attributes: [ 'slope', 'intercept', 'amplitude', 'exponent', 'offset' ],+ slope: { initial: 1 }, amplitude: { initial: 1 }, exponent: { initial: 1 } },+ { interface: 'SVGFECompositeElement', attributes: [ 'k1', 'k2', 'k3', 'k4' ] },+ { interface: 'SVGFEConvolveMatrixElement',+ attributes: [ 'divisor', 'bias', 'kernelUnitLengthX', 'kernelUnitLengthY' ],+ divisor: { initial: 1 } },+ { interface: 'SVGFEDiffuseLightingElement',+ attributes: [ 'surfaceScale', 'diffuseConstant', 'kernelUnitLengthX', 'kernelUnitLengthY' ],+ diffuseConstant: { initial: 1 }, surfaceScale: { initial: 1 } },+ { interface: 'SVGFEDisplacementMapElement', attributes: [ 'scale' ] },+ { interface: 'SVGFEDistantLightElement', attributes: [ 'azimuth', 'elevation' ] },+ { interface: 'SVGFEDropShadowElement',+ attributes: [ 'dx', 'dy', 'stdDeviationX', 'stdDeviationY' ],+ dx: { initial: 2 }, dy: { initial: 2 }, stdDeviationX: { initial: 2 }, stdDeviationY: { initial: 2 } },+ { interface: 'SVGFEGaussianBlurElement', attributes: [ 'stdDeviationX', 'stdDeviationY' ] },+ { interface: 'SVGFEMorphologyElement', attributes: [ 'radiusX', 'radiusY' ] },+ { interface: 'SVGFEOffsetElement', attributes: [ 'dx', 'dy' ] },+ { interface: 'SVGFEPointLightElement', attributes: [ 'x', 'y', 'z' ] },+ { interface: 'SVGFESpecularLightingElement',+ attributes: [ 'surfaceScale', 'specularConstant', 'specularExponent', 'kernelUnitLengthX', 'kernelUnitLengthY' ],+ specularConstant: { initial: 1 }, specularExponent: { initial: 1 }, surfaceScale: { initial: 1 } },+ { interface: 'SVGFESpotLightElement',+ attributes: [ 'x', 'y', 'z', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'specularExponent', 'limitingConeAngle' ],+ specularExponent: { initial: 1 } },+ { interface: 'SVGFETurbulenceElement', attributes: [ 'baseFrequencyX', 'baseFrequencyY', 'seed' ] },+ { interface: 'SVGGeometryElement', attributes: [ 'pathLength' ] },+ { interface: 'SVGStopElement', attributes: [ 'offset' ] },+], { initial: 0, valid: '42', mapProperty: propertyToAttributeMap });+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.htmlnew file mode 100644index 00000000000..884b87295ae--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.html@@ -0,0 +1,148 @@+<!DOCTYPE html>+<title>SVGAnimatedNumber, invalid values</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<script>+// An attribute whose value does not match its grammar is assumed to have been specified as the+// initial value, while the content attribute keeps whatever was specified.+// https://w3c.github.io/svgwg/svg2-draft/types.html#syntax+//+// SVGAnimatedNumber-initial-values.html covers every attribute, but only for removeAttribute()+// and one unparseable string. This covers the parsing itself, so one representative is used per+// combination of grammar and initial value rather than every attribute.++const numbers = [+ { interface: 'SVGComponentTransferFunctionElement', element: 'feFuncA', attribute: 'slope', initial: 1 },+ { interface: 'SVGComponentTransferFunctionElement', element: 'feFuncA', attribute: 'intercept', initial: 0 },+ { interface: 'SVGFEDropShadowElement', element: 'feDropShadow', attribute: 'dx', initial: 2 },+ { interface: 'SVGFEDiffuseLightingElement', element: 'feDiffuseLighting', attribute: 'surfaceScale', initial: 1 },+ { interface: 'SVGGeometryElement', element: 'rect', attribute: 'pathLength', initial: 0 },+ { interface: 'SVGFECompositeElement', element: 'feComposite', attribute: 'k2', initial: 0 },+];++// One content attribute drives two properties.+const pairs = [+ { interface: 'SVGFEGaussianBlurElement', element: 'feGaussianBlur', contentAttribute: 'stdDeviation',+ x: 'stdDeviationX', y: 'stdDeviationY', initial: 0 },+ { interface: 'SVGFEDropShadowElement', element: 'feDropShadow', contentAttribute: 'stdDeviation',+ x: 'stdDeviationX', y: 'stdDeviationY', initial: 2 },+ { interface: 'SVGFEMorphologyElement', element: 'feMorphology', contentAttribute: 'radius',+ x: 'radiusX', y: 'radiusY', initial: 0 },+ { interface: 'SVGFETurbulenceElement', element: 'feTurbulence', contentAttribute: 'baseFrequency',+ x: 'baseFrequencyX', y: 'baseFrequencyY', initial: 0 },+];++function create(element) {+ return document.createElementNS('http://www.w3.org/2000/svg', element);+}++// Each test sets a value different from the initial one first, so that reverting to the initial+// value is distinguishable from keeping the previous value. Where the initial value is 0 the two+// are otherwise identical.+const primer = '7';++// <number> is defined using CSS syntax, which ignores whitespace around the value.+const surroundedByWhitespace = [+ { label: 'spaces', value: ' 5 ' },+ { label: 'newlines', value: '\n5\n' },+ { label: 'tabs', value: '\t5\t' },+];++const unparseable = [+ // Chrome falls back to 0 rather than the initial value for an empty value, so it fails this for+ // any attribute whose initial value is not 0. Firefox reverts correctly.+ { label: 'empty string', value: '' },+ { label: 'unit suffix', value: '5px' },+ { label: 'trailing junk', value: '12abc' },+ { label: 'trailing dot', value: '5.' },+ { label: 'two signs', value: '--3' },+ { label: 'lone sign', value: '-' },+];++for (let info of numbers) {+ let label = document.title + ', ' + info.interface + '.prototype.' + info.attribute;++ for (let { label: caseLabel, value } of surroundedByWhitespace) {+ test(function() {+ let e = create(info.element);+ e.setAttribute(info.attribute, primer);+ e.setAttribute(info.attribute, value);+ assert_equals(e[info.attribute].baseVal, 5, 'whitespace is ignored');+ }, label + ' (' + caseLabel + ' around the value)');+ }++ for (let { label: caseLabel, value } of unparseable) {+ test(function() {+ let e = create(info.element);+ e.setAttribute(info.attribute, primer);+ assert_not_equals(e[info.attribute].baseVal, info.initial, 'primed');+ e.setAttribute(info.attribute, value);+ assert_equals(e[info.attribute].baseVal, info.initial, 'initial after');+ }, label + ' (' + caseLabel + ')');+ }++ test(function() {+ let e = create(info.element);+ e.setAttribute(info.attribute, primer);+ e.setAttribute(info.attribute, 'foobar');+ assert_equals(e[info.attribute].baseVal, info.initial, 'initial after');+ assert_equals(e.getAttribute(info.attribute), 'foobar', 'content attribute');+ }, label + ' (content attribute is not rewritten)');++ test(function() {+ let e = create(info.element);+ e.setAttribute(info.attribute, primer);+ e.setAttribute(info.attribute, '3 4');+ assert_equals(e[info.attribute].baseVal, info.initial, 'initial after');+ }, label + ' (a second number is not allowed)');++ test(function() {+ let e = create(info.element);+ e.setAttribute(info.attribute, '+5');+ assert_equals(e[info.attribute].baseVal, 5, 'explicit plus');+ e.setAttribute(info.attribute, '.5');+ assert_equals(e[info.attribute].baseVal, 0.5, 'leading dot');+ }, label + ' (accepted number syntax)');+}++for (let info of pairs) {+ let label = document.title + ', ' + info.interface + '.prototype.' + info.contentAttribute;++ test(function() {+ let e = create(info.element);+ e.setAttribute(info.contentAttribute, ' 3 ');+ assert_equals(e[info.x].baseVal, 3, 'x');+ assert_equals(e[info.y].baseVal, 3, 'y');+ }, label + ' (one number, surrounded by whitespace)');++ test(function() {+ let e = create(info.element);+ e.setAttribute(info.contentAttribute, ' 3 4 ');+ assert_equals(e[info.x].baseVal, 3, 'x');+ assert_equals(e[info.y].baseVal, 4, 'y');+ }, label + ' (two numbers, surrounded by whitespace)');++ for (let value of ['3,4', '3, 4']) {+ test(function() {+ let e = create(info.element);+ e.setAttribute(info.contentAttribute, value);+ assert_equals(e[info.x].baseVal, 3, 'x');+ assert_equals(e[info.y].baseVal, 4, 'y');+ }, label + ' (comma separated, "' + value + '")');+ }++ // A pair fails as a whole, so both properties revert. Keeping the first number would leave the+ // element in a state the author never asked for.+ for (let value of ['3 abc', '3px', '']) {+ test(function() {+ let e = create(info.element);+ e.setAttribute(info.contentAttribute, primer);+ assert_not_equals(e[info.x].baseVal, info.initial, 'primed');+ e.setAttribute(info.contentAttribute, value);+ assert_equals(e[info.x].baseVal, info.initial, 'x reverted');+ assert_equals(e[info.y].baseVal, info.initial, 'y reverted');+ assert_equals(e.getAttribute(info.contentAttribute), value, 'content attribute');+ }, label + ' (both revert, "' + value + '")');+ }+}+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.svg b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.svgnew file mode 100644index 00000000000..e65a74c20a6--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.svg@@ -0,0 +1,171 @@+<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"+ xmlns:h="http://www.w3.org/1999/xhtml">+ <title>SVGGeometryElement.prototype.isPointInStroke</title>+ <metadata>+ <h:link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#InterfaceSVGGeometryElement"/>+ <h:link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#__svg__SVGGeometryElement__isPointInStroke"/>+ </metadata>+ <h:script src="../../../resources/testharness.js"/>+ <h:script src="../../../resources/testharnessreport.js"/>++ <g id="container">+ <circle cx="10" id="circle-with-stroke-intersecting-origin" r="10"+ fill="none" stroke="blue" stroke-width="10"/>+ <ellipse id="ellipse" cx="150" cy="150" rx="200" ry="100"+ fill="blue" fill-opacity="0.1"+ stroke-width="100" stroke="lightblue"+ stroke-opacity="0.2"/>+ <g transform="scale(10)">+ <circle id="circle-with-non-scaling-stroke" cx="20" cy="20" r="10"+ fill="none" stroke-width="1" stroke="blue"+ vector-effect="non-scaling-stroke"/>+ </g>+ <rect id="rect-with-dash-array" width="100" height="100" x="200" y="50"+ stroke-dasharray="100" stroke="blue" stroke-width="10" fill="none"/>+ <rect id="rect-with-dash-offset" width="100" height="100" x="200" y="180"+ stroke-dasharray="100" stroke-dashoffset="100"+ stroke="blue" stroke-width="10" fill="none"/>+ <rect id="rect-with-path-length" width="100" height="100" x="200" y="310"+ stroke-dasharray="100" pathLength="200"+ stroke="blue" stroke-width="10" fill="none"/>+ <polygon id="poly-with-miter" points="10,300 110,320 10,340"+ fill="none" stroke="yellow" stroke-width="10"/>+ <polygon id="poly-with-miter-limit-10" points="120,300 220,320 120,340"+ fill="none" stroke="yellow" stroke-width="10" stroke-miterlimit="10"/>+ <polygon id="poly-with-linejoin-round" points="230,300 330,320 230,340"+ fill="none" stroke="yellow" stroke-width="10" stroke-linejoin="round"+ stroke-miterlimit="100"/>+ <line id="line-with-round-linecap" x1="10" y1="300" x2="20" y2="300"+ stroke="orange" stroke-width="20" stroke-linecap="round"/>+ </g>++ <script><![CDATA[+ 'use strict';++ const pointsToTest = [+ { x: 275, y: 250 }, // outer stroke+ { x: 300, y: 200 }, // inner stroke+ { x: 375, y: 375 }, // outside ellipse+ { x: 0, y: 0 }, // outside ellipse+ { x: 150, y: 150 }, // inside ellipse+ ];+ function testPoints(element) {+ const expected = [true, true, false, false, false];+ pointsToTest.forEach(function(point, index) {+ assert_equals(element.isPointInStroke(point),+ expected[index], "point at " + point.x + ", " + point.y);+ });+ }+ function testResultVector(element) {+ return pointsToTest.map(function(point) {+ return element.isPointInStroke(point);+ });+ }++ test(function() {+ let strokeAtOrigin = document.getElementById("circle-with-stroke-intersecting-origin");+ assert_true(strokeAtOrigin.isPointInStroke());+ let ellipse = document.getElementById("ellipse");+ assert_false(ellipse.isPointInStroke());+ }, document.title + ", no arguments.");++ test(function() {+ let strokeAtOrigin = document.getElementById("circle-with-stroke-intersecting-origin");+ assert_true(strokeAtOrigin.isPointInStroke(null));+ assert_true(strokeAtOrigin.isPointInStroke(undefined));+ let ellipse = document.getElementById("ellipse");+ assert_false(ellipse.isPointInStroke(null));+ assert_false(ellipse.isPointInStroke(undefined));+ }, document.title + ", null/undefined.");++ test(function() {+ let strokeAtOrigin = document.getElementById("circle-with-stroke-intersecting-origin");+ assert_false(strokeAtOrigin.isPointInStroke({ x: NaN, y: 0 })), "x is NaN";+ assert_false(strokeAtOrigin.isPointInStroke({ x: Infinity, y: 0 }), "x is Infinity");+ assert_false(strokeAtOrigin.isPointInStroke({ x: -Infinity, y: 0 }), "x is -Infinity");+ assert_false(strokeAtOrigin.isPointInStroke({ x: 0, y: NaN }), "y is NaN");+ assert_false(strokeAtOrigin.isPointInStroke({ x: 0, y: Infinity }), "y is Infinity");+ assert_false(strokeAtOrigin.isPointInStroke({ x: 0, y: -Infinity }), "y is -Infinity");+ }, document.title + ", non-finite argument.");++ test(function() {+ testPoints(document.getElementById("ellipse"));+ }, document.title + ", functional test.");++ test(function() {+ const container = document.getElementById("container");+ try {+ container.style.zoom = 3;+ testPoints(document.getElementById("ellipse"));+ } finally {+ container.style.zoom = 1;+ }+ }, document.title + ", functional test with zoom.");++ test(function() {+ let rectWithDashes = document.getElementById("rect-with-dash-array");+ assert_true(rectWithDashes.isPointInStroke({ x: 250, y: 48 }));+ assert_false(rectWithDashes.isPointInStroke({ x: 302, y: 100 }));+ }, document.title + ", 'stroke-dasharray'.");++ test(function() {+ let rectWithOffsetDashes = document.getElementById("rect-with-dash-offset");+ assert_false(rectWithOffsetDashes.isPointInStroke({ x: 250, y: 178 }));+ assert_true(rectWithOffsetDashes.isPointInStroke({ x: 302, y: 230 }));+ }, document.title + ", 'stroke-dashoffset'.");++ test(function() {+ let polyWithMiter = document.getElementById("poly-with-miter");+ assert_true(polyWithMiter.isPointInStroke({ x: 110, y: 320 }));+ assert_false(polyWithMiter.isPointInStroke({ x: 113, y: 320 }));+ let polyWithMiterLimit10 = document.getElementById("poly-with-miter-limit-10");+ assert_true(polyWithMiterLimit10.isPointInStroke({ x: 223, y: 320 }));+ }, document.title + ", 'stroke-miterlimit'.");++ test(function() {+ let polyWithRoundJoin = document.getElementById("poly-with-linejoin-round");+ assert_true(polyWithRoundJoin.isPointInStroke({ x: 334, y: 320 }));+ assert_false(polyWithRoundJoin.isPointInStroke({ x: 336, y: 320 }));+ }, document.title + ", 'stroke-linejoin'.");++ test(function() {+ let lineWithRoundCap = document.getElementById("line-with-round-linecap");+ assert_true(lineWithRoundCap.isPointInStroke({ x: 25, y: 300 }));+ }, document.title + ", 'stroke-linecap'.");++ test(function() {+ let rectWithPathLength = document.getElementById("rect-with-path-length");+ assert_true(rectWithPathLength.isPointInStroke({ x: 250, y: 308 }));+ assert_false(rectWithPathLength.isPointInStroke({ x: 250, y: 412 }));+ }, document.title + ", 'pathLength'.");++ test(function() {+ let circleWithNSS = document.getElementById("circle-with-non-scaling-stroke");+ assert_true(circleWithNSS.isPointInStroke({ x: 9.975, y: 20 }));+ assert_false(circleWithNSS.isPointInStroke({ x: 9.9, y: 20 }));+ }, document.title + ", 'vector-effect'.");++ test(function() {+ let ellipse = document.getElementById("ellipse");+ // Results for 'pointer-events: visiblePainted' and 'visibility: visible'.+ let expectedResults = testResultVector(ellipse);++ const pointerEventValues = [ "bounding-box", "visibleFill",+ "visibleStroke", "visiblePainted", "fill",+ "stroke", "painted", "visible", "all",+ "none" ];++ ellipse.setAttribute("visibility", "visible");+ for (let pointerEventValue of pointerEventValues) {+ ellipse.setAttribute("pointer-events", pointerEventValue);+ assert_array_equals(expectedResults, testResultVector(ellipse));+ }++ ellipse.setAttribute("visibility", "hidden");+ for (let pointerEventValue of pointerEventValues) {+ ellipse.setAttribute("pointer-events", pointerEventValue);+ assert_array_equals(expectedResults, testResultVector(ellipse));+ }+ }, document.title + ", 'visibility' and 'pointer-events' have no effect.");+]]></script>+</svg>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGGraphicsElement.getBBox-01.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGGraphicsElement.getBBox-01.htmlnew file mode 100644index 00000000000..5527421a9e9--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGGraphicsElement.getBBox-01.html@@ -0,0 +1,134 @@+<!doctype html>+<title>SVGGraphicsElement.prototype.getBBox</title>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#__svg__SVGGraphicsElement__getBBox">+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/coords.html#BoundingBoxes">+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<div id="testcontainer">+<svg width="1" height="1" visibility="hidden">+<g id="g1">+ <polygon id="p1" fill="none" stroke="red"/>+ <rect id="r1" x="50" y="50" width="50" height="50" fill="green"/>+</g>+<g id="g2">+ <rect id="r2" x="50" y="50" width="50" height="50" fill="green"/>+ <rect id="r3" x="20" y="20" width="20" height="0" fill="red"/>+ <rect id="r4" x="120" y="20" width="20" height="20" fill="blue" style="display:none"/>+ <ellipse id="c1" cx="20" cy="120" rx="0" ry="20" fill="black"/>+ <g>+ <rect id="r5" x="120" y="120" width="-1" height="100" fill="cyan"/>+ </g>+</g>+<g id="g3">+ <path id="p2" fill="none" stroke="red"/>+ <rect id="r6" x="50" y="50" width="50" height="50" fill="green"/>+ <!-- The following path should be included in the bbox. -->+ <path d=""/>+</g>+<g id="g4">+ <polyline id="p3" fill="none" stroke="red"/>+ <rect id="r7" x="50" y="50" width="50" height="50" fill="green"/>+</g>+<g id="g5">+ <path id="p4" d="M3"/>+ <rect id="r8" x="50" y="50" width="50" height="50" fill="green"/>+</g>+<g id="g6">+ <polygon id="p5" points="47" fill="none" stroke="red"/>+ <rect id="r9" x="50" y="50" width="50" height="50" fill="green"/>+</g>+<g id="g7">+ <polyline id="p6" points="47" fill="none" stroke="red"/>+ <rect id="r10" x="50" y="50" width="50" height="50" fill="green"/>+</g>+<g id="g8">+ <path id="p7" d="M40 20h0" fill="none" stroke="red"/>+ <rect id="r11" x="50" y="50" width="50" height="50" fill="green"/>+</g>+<g id="g9">+ <rect width="1" height="1"/>+ <path d="M 0.5 0.5 0.5 0 A 0.5 0.5 0 0 1 0.9296658068966942 0.7557093943988227 z"/>+</g>+<g id="g10">+ <rect id="r12" x="5" y="5" width="10" height="10"/>+ <foreignObject/>+</g>+<g id="g11">+ <rect id="r13" x="5" y="5" width="10" height="10"/>+ <image/>+</g>+</svg>+</div>+<div id=log></div>+<script>+const EPSILON = Math.pow(2, -24); // float epsilon++function assert_rect_approx_equals(rect, expected, epsilon) {+ assert_approx_equals(rect.x, expected.x, epsilon, "x");+ assert_approx_equals(rect.y, expected.y, epsilon, "y");+ assert_approx_equals(rect.width, expected.width, epsilon, "width");+ assert_approx_equals(rect.height, expected.height, epsilon, "height");+}++test(function() {+ assert_rect_approx_equals(document.createElementNS("http://www.w3.org/2000/svg", "rect").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);+}, "getBBox on detached element");+test(function() {+ assert_rect_approx_equals(document.getElementById("p1").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);+}, "getBBox on polygon with no points attribute");+test(function() {+ assert_rect_approx_equals(document.getElementById("p3").getBBox(), {"x":0, "y":0, "width":0, "height":0}, EPSILON);+}, "getBBox on polyline with no points attribute");+test(function() {+ assert_rect_approx_equals(document.getElementById("p2").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);+}, "getBBox on path with no d attribute");+test(function() {+ assert_rect_approx_equals(document.getElementById("p4").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);+}, "getBBox on path with no valid path segments in d attribute");+test(function() {+ assert_rect_approx_equals(document.getElementById("p5").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);+}, "getBBox on polygon with no valid point in the points attribute");+test(function() {+ assert_rect_approx_equals(document.getElementById("p6").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);+}, "getBBox on polyline with no valid point in the points attribute");+test(function() {+ assert_rect_approx_equals(document.getElementById("g1").getBBox(), document.getElementById("r1").getBBox(), EPSILON);+}, "polygon doesn't contribute to parent bbox");+test(function() {+ assert_rect_approx_equals(document.getElementById("g1").getBBox(), document.getElementById("r2").getBBox(), EPSILON);+}, "group with hidden child");+test(function() {+ assert_rect_approx_equals(document.getElementById("g3").getBBox(), document.getElementById("r6").getBBox(), EPSILON);+}, "path doesn't contribute to parent bbox");+test(function() {+ assert_rect_approx_equals(document.getElementById("g5").getBBox(), document.getElementById("r8").getBBox(), EPSILON);+}, "path with only invalid segments doesn't contribute to parent bbox");+test(function() {+ assert_rect_approx_equals(document.getElementById("g4").getBBox(), document.getElementById("r7").getBBox(), EPSILON);+}, "polyline doesn't contribute to parent bbox");+test(function() {+ assert_rect_approx_equals(document.getElementById("g6").getBBox(), document.getElementById("r9").getBBox(), EPSILON);+}, "polygon with no valid points doesn't contribute to parent bbox");+test(function() {+ assert_rect_approx_equals(document.getElementById("g7").getBBox(), document.getElementById("r10").getBBox(), EPSILON);+}, "polyline with no valid points doesn't contribute to parent bbox");+test(function() {+ assert_rect_approx_equals(document.getElementById("p7").getBBox(), {"x":40, "y":20, "width":0, "height":0 }, EPSILON);+}, "getBBox on path with no height");+test(function() {+ assert_rect_approx_equals(document.getElementById("g8").getBBox(), {"x":40, "y":20, "width":60, "height":80 }, EPSILON);+}, "path with no height should contribute to parent bbox");+test(function() {+ assert_rect_approx_equals(document.getElementById("g9").getBBox(), {"x":0, "y":0, "width":1, "height":1 }, EPSILON);+}, "arc bbox should be tight");+test(function() {+ let g10 = document.getElementById("g10");+ let r12 = document.getElementById("r12");+ assert_rect_approx_equals(g10.getBBox(), r12.getBBox(), EPSILON);+}, "empty foreignObject does not contribute to parent bbox");+test(function() {+ let g11 = document.getElementById("g11");+ let r13 = document.getElementById("r13");+ assert_rect_approx_equals(g11.getBBox(), r13.getBBox(), EPSILON);+}, "empty image does not contribute to parent bbox");+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGList-animVal-reflects-base-value.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGList-animVal-reflects-base-value.htmlnew file mode 100644index 00000000000..65ba8a99439--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGList-animVal-reflects-base-value.html@@ -0,0 +1,132 @@+<!DOCTYPE HTML>+<title>animVal of a list attribute reflects the base value when nothing is animating</title>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#DOMInterfacesForReflectingSVGAttributes">+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#InterfaceSVGAnimatedNumberList">+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#ReadOnlyList">+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<svg id="stage" width="200" height="100" viewBox="0 0 200 100"></svg>+<script>+// "The baseVal and animVal IDL attributes represent the current non-animated+// value of the reflected attribute. On getting baseVal or animVal, an+// SVGNumberList object is returned that reflects the base value of the+// reflected attribute."+//+// There is no animation anywhere in this file, so SVG 1.1 and SVG 2 ask for the+// same thing here and the SVG 2 "animVal is an alias of baseVal" wording does not+// have to be settled for these subtests to be meaningful.+//+// The order of the two reads is the whole point. Reading animVal BEFORE the+// attribute changes is what catches an implementation that builds animVal once+// and never refreshes it; the same assertions after the change would pass there.++const SVGNS = "http://www.w3.org/2000/svg";+const stage = document.getElementById("stage");++const SUBJECTS = [+ {+ name: "SVGNumberList (rotate on text)",+ attr: "rotate", v3: "10 20 30", v2: "40 50", shrunkAt0: 40,+ build() {+ const e = document.createElementNS(SVGNS, "text");+ e.setAttribute("rotate", this.v3);+ e.setAttribute("x", "5");+ e.setAttribute("y", "20");+ stage.appendChild(e);+ return e;+ },+ base: e => e.rotate.baseVal,+ anim: e => e.rotate.animVal,+ read: it => it.value,+ write: (it, v) => { it.value = v; },+ },+ {+ name: "SVGLengthList (x on text)",+ attr: "x", v3: "1 2 3", v2: "7 8", shrunkAt0: 7,+ build() {+ const e = document.createElementNS(SVGNS, "text");+ e.setAttribute("x", this.v3);+ e.setAttribute("y", "45");+ stage.appendChild(e);+ return e;+ },+ base: e => e.x.baseVal,+ anim: e => e.x.animVal,+ read: it => it.value,+ write: (it, v) => { it.value = v; },+ },+ {+ name: "SVGPointList (points on polyline, animatedPoints)",+ attr: "points", v3: "1,2 3,4 5,6", v2: "11,12 13,14", shrunkAt0: 11,+ build() {+ const e = document.createElementNS(SVGNS, "polyline");+ e.setAttribute("points", this.v3);+ e.setAttribute("fill", "none");+ e.setAttribute("stroke", "black");+ stage.appendChild(e);+ return e;+ },+ base: e => e.points,+ anim: e => e.animatedPoints,+ read: it => it.x,+ write: (it, v) => { it.x = v; },+ },+ {+ name: "SVGTransformList (gradientTransform on linearGradient)",+ attr: "gradientTransform",+ v3: "translate(1,2) translate(3,4) translate(5,6)",+ v2: "translate(11,12) translate(13,14)", shrunkAt0: 11,+ build() {+ const e = document.createElementNS(SVGNS, "linearGradient");+ e.setAttribute("gradientTransform", this.v3);+ stage.appendChild(e);+ return e;+ },+ base: e => e.gradientTransform.baseVal,+ anim: e => e.gradientTransform.animVal,+ read: it => it.matrix.e,+ write: (it, v) => { it.setTranslate(v, 0); },+ },+];++for (const s of SUBJECTS) {+ test(() => {+ const el = s.build();+ const anim = s.anim(el);+ assert_equals(anim.numberOfItems, 3, "before the change");+ el.setAttribute(s.attr, s.v2);+ assert_equals(s.base(el).numberOfItems, 2, "baseVal after the change");+ assert_equals(anim.numberOfItems, 2, "animVal after the change");+ }, s.name + ": animVal read before an attribute change reports the new item count");++ test(() => {+ const el = s.build();+ const anim = s.anim(el);+ anim.getItem(0);+ el.setAttribute(s.attr, s.v2);+ assert_equals(s.read(anim.getItem(0)), s.shrunkAt0);+ }, s.name + ": animVal read before an attribute change reports the new value");++ test(() => {+ const el = s.build();+ const anim = s.anim(el);+ el.setAttribute(s.attr, s.v2);+ assert_equals(s.anim(el), anim, "animVal is [SameObject]");+ }, s.name + ": the animVal list object survives an attribute change");++ test(() => {+ const el = s.build();+ const anim = s.anim(el);+ const n = anim.numberOfItems;+ s.base(el).removeItem(2);+ assert_equals(n, 3, "before the change");+ assert_equals(anim.numberOfItems, 2, "animVal after the change");+ }, s.name + ": animVal reports the new item count after a baseVal DOM change");++ test(() => {+ const el = s.build();+ const item = s.anim(el).getItem(0);+ assert_throws_dom("NoModificationAllowedError", () => { s.write(item, 42); });+ }, s.name + ": animVal items are read only");+}+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.htmlnew file mode 100644index 00000000000..fc6fb902880--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.html@@ -0,0 +1,294 @@+<!DOCTYPE HTML>+<title>Synchronizing a list interface object when the reflected attribute changes</title>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#SynchronizingReflectedValues">+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#TermSynchronizeList">+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#TermDetach">+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/coords.html#TransformMatrixObject">+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<svg id="stage" width="200" height="100" viewBox="0 0 200 100"></svg>+<script>+// A base value change runs the steps for synchronizing a list interface object.+// Step 4.1 is the only detach and is guarded by "If length > new length", so a+// held item object survives a same-count change, a grow, and the part of a+// shrink that is still in range. Step 4.4 then sets its value. This file has one+// subtest per branch per list interface, and it keeps identity assertions in+// separate subtests from value assertions: an engine that returns a fresh+// wrapper object from every getItem call fails the identity ones for an+// unrelated reason, and the value ones say what an author actually loses.++const SVGNS = "http://www.w3.org/2000/svg";+const stage = document.getElementById("stage");++const SUBJECTS = [+ {+ name: "SVGNumberList (rotate on text)",+ attr: "rotate",+ v3: "10 20 30", v3b: "40 50 60", v4: "40 50 60 70", v2: "40 50",+ newAt: [40, 50, 60], shrunkAt: [40, 50], oldAt: [10, 20, 30],+ build() {+ const e = document.createElementNS(SVGNS, "text");+ e.setAttribute("rotate", this.v3);+ e.setAttribute("x", "5");+ e.setAttribute("y", "20");+ stage.appendChild(e);+ return e;+ },+ list: e => e.rotate.baseVal,+ read: it => it.value,+ write: (it, v) => { it.value = v; },+ },+ {+ name: "SVGLengthList (x on text)",+ attr: "x",+ v3: "1 2 3", v3b: "7 8 9", v4: "7 8 9 10", v2: "7 8",+ newAt: [7, 8, 9], shrunkAt: [7, 8], oldAt: [1, 2, 3],+ build() {+ const e = document.createElementNS(SVGNS, "text");+ e.setAttribute("x", this.v3);+ e.setAttribute("y", "45");+ stage.appendChild(e);+ return e;+ },+ list: e => e.x.baseVal,+ read: it => it.value,+ write: (it, v) => { it.value = v; },+ },+ {+ name: "SVGPointList (points on polyline)",+ attr: "points",+ v3: "1,2 3,4 5,6", v3b: "11,12 13,14 15,16",+ v4: "11,12 13,14 15,16 17,18", v2: "11,12 13,14",+ newAt: [11, 13, 15], shrunkAt: [11, 13], oldAt: [1, 3, 5],+ build() {+ const e = document.createElementNS(SVGNS, "polyline");+ e.setAttribute("points", this.v3);+ e.setAttribute("fill", "none");+ e.setAttribute("stroke", "black");+ stage.appendChild(e);+ return e;+ },+ list: e => e.points,+ read: it => it.x,+ write: (it, v) => { it.x = v; },+ },+ {+ name: "SVGTransformList (transform on g)",+ attr: "transform",+ v3: "translate(1,2) translate(3,4) translate(5,6)",+ v3b: "translate(11,12) translate(13,14) translate(15,16)",+ v4: "translate(11,12) translate(13,14) translate(15,16) translate(17,18)",+ v2: "translate(11,12) translate(13,14)",+ newAt: [11, 13, 15], shrunkAt: [11, 13], oldAt: [1, 3, 5],+ build() {+ const e = document.createElementNS(SVGNS, "g");+ e.setAttribute("transform", this.v3);+ stage.appendChild(e);+ return e;+ },+ list: e => e.transform.baseVal,+ read: it => it.matrix.e,+ write: (it, v) => { it.setTranslate(v, 0); },+ },+ {+ name: "SVGTransformList (gradientTransform on linearGradient)",+ attr: "gradientTransform",+ v3: "translate(1,2) translate(3,4) translate(5,6)",+ v3b: "translate(11,12) translate(13,14) translate(15,16)",+ v4: "translate(11,12) translate(13,14) translate(15,16) translate(17,18)",+ v2: "translate(11,12) translate(13,14)",+ newAt: [11, 13, 15], shrunkAt: [11, 13], oldAt: [1, 3, 5],+ build() {+ const e = document.createElementNS(SVGNS, "linearGradient");+ e.setAttribute("gradientTransform", this.v3);+ stage.appendChild(e);+ return e;+ },+ list: e => e.gradientTransform.baseVal,+ read: it => it.matrix.e,+ write: (it, v) => { it.setTranslate(v, 0); },+ },+];++for (const s of SUBJECTS) {+ // Precondition. If this fails, the identity subtests below cannot be read as+ // statements about the synchronize algorithm.+ test(() => {+ const list = s.list(s.build());+ assert_equals(list.getItem(0), list.getItem(0),+ "getItem must return the same object for the same index");+ }, s.name + ": getItem returns the same object for one index, with no attribute change");++ // Same item count. Steps 4.1 and 4.2 are both skipped.+ test(() => {+ const el = s.build();+ const list = s.list(el);+ const held = [list.getItem(0), list.getItem(1), list.getItem(2)];+ el.setAttribute(s.attr, s.v3b);+ for (let i = 0; i < 3; i++)+ assert_equals(s.read(held[i]), s.newAt[i], "held item " + i);+ }, s.name + ": a same-count change updates the values of the held items");++ test(() => {+ const el = s.build();+ const list = s.list(el);+ const held = list.getItem(0);+ el.setAttribute(s.attr, s.v3b);+ assert_equals(list.getItem(0), held, "the object at index 0 is unchanged");+ }, s.name + ": a same-count change keeps the held item in the list");++ test(() => {+ const el = s.build();+ const list = s.list(el);+ const held = list.getItem(0);+ el.setAttribute(s.attr, s.v3b);+ s.write(held, 42);+ assert_equals(s.read(s.list(el).getItem(0)), 42,+ "the list reports the value written through the held item");+ }, s.name + ": the held item is still attached after a same-count change");++ // The list grows. Step 4.2 appends, step 4.4 updates everything.+ test(() => {+ const el = s.build();+ const list = s.list(el);+ const held = list.getItem(0);+ el.setAttribute(s.attr, s.v4);+ assert_equals(list.numberOfItems, 4, "numberOfItems");+ assert_equals(s.read(held), s.newAt[0], "held item 0");+ }, s.name + ": a grow updates the held item and appends new ones");++ // The list shrinks. Step 4.1 detaches only the items at or above new length.+ test(() => {+ const el = s.build();+ const list = s.list(el);+ const survivor = list.getItem(0);+ el.setAttribute(s.attr, s.v2);+ assert_equals(list.numberOfItems, 2, "numberOfItems");+ assert_equals(s.read(survivor), s.shrunkAt[0], "the item still in range");+ }, s.name + ": a shrink updates the held items that are still in range");++ test(() => {+ const el = s.build();+ const list = s.list(el);+ const truncated = list.getItem(2);+ el.setAttribute(s.attr, s.v2);+ assert_equals(s.read(truncated), s.oldAt[2],+ "a detached object keeps the value it had");+ }, s.name + ": a shrink detaches the truncated item, which keeps its value");++ // Asserts against the LIST, never against the serialized attribute string. An+ // implementation may reserialize the attribute in a canonical form that differs+ // from the author's string (for instance dropping the U+002C between an+ // SVGPoint's x and y), and comparing strings would read that as a value change.+ test(() => {+ const el = s.build();+ const list = s.list(el);+ const truncated = list.getItem(2);+ el.setAttribute(s.attr, s.v2);+ s.write(truncated, 42);+ const values = [];+ for (let i = 0; i < list.numberOfItems; i++)+ values.push(s.read(list.getItem(i)));+ assert_equals(values.indexOf(42), -1,+ "a detached object is no longer associated with the element, so the "+ + "write landed nowhere in the list: got [" + values.join(",") + "]");+ assert_equals(s.read(truncated), 42,+ "a detached object is no longer read only");+ }, s.name + ": the truncated item stops reaching the element and stops being read only");++ // The list object itself is [SameObject] and is not replaced.+ test(() => {+ const el = s.build();+ const list = s.list(el);+ el.setAttribute(s.attr, s.v3b);+ assert_equals(s.list(el), list, "the list object is not replaced");+ }, s.name + ": the list interface object survives the change");++ // An empty string parses to an empty list, so new length is 0 and step 4.1+ // detaches every item.+ test(() => {+ const el = s.build();+ const list = s.list(el);+ const held = list.getItem(0);+ el.setAttribute(s.attr, "");+ assert_equals(list.numberOfItems, 0, "numberOfItems");+ assert_equals(s.read(held), s.oldAt[0], "the detached item keeps its value");+ s.write(held, 42);+ assert_equals(list.numberOfItems, 0, "a write through the detached item does not reach the list");+ }, s.name + ": an empty string empties the list and detaches every item");+}++// Step 4.4 carries no condition on the transform function, and 4.4.4 requires+// the item's matrix object to be updated rather than replaced.+for (const attr of ["transform", "gradientTransform"]) {+ const build = (value) => {+ const e = document.createElementNS(SVGNS,+ attr === "transform" ? "g" : "linearGradient");+ e.setAttribute(attr, value);+ stage.appendChild(e);+ return e;+ };+ const listOf = (e) => attr === "transform" ? e.transform.baseVal+ : e.gradientTransform.baseVal;++ test(() => {+ const el = build("translate(1,2)");+ const list = listOf(el);+ const held = list.getItem(0);+ el.setAttribute(attr, "scale(3)");+ assert_equals(list.getItem(0), held, "the object at index 0 is unchanged");+ }, "SVGTransformList (" + attr + "): a changed transform function keeps the held item in the list");++ // Separate from the identity subtest above on purpose: this one is readable in+ // an engine that returns a fresh wrapper from every getItem call.+ test(() => {+ const el = build("translate(1,2)");+ const list = listOf(el);+ const held = list.getItem(0);+ const matrix = held.matrix;+ el.setAttribute(attr, "scale(3)");+ assert_equals(held.type, SVGTransform.SVG_TRANSFORM_SCALE, "type");+ assert_equals(held.matrix, matrix, "the matrix object is not replaced");+ assert_equals(matrix.a, 3, "the matrix components were updated");+ }, "SVGTransformList (" + attr + "): a changed transform function updates the held item's type and matrix");++ test(() => {+ const el = build("translate(1,2) scale(3)");+ const list = listOf(el);+ const held0 = list.getItem(0);+ const held1 = list.getItem(1);+ el.setAttribute(attr, "scale(4) translate(5,6)");+ assert_equals(list.getItem(0), held0, "index 0");+ assert_equals(list.getItem(1), held1, "index 1");+ }, "SVGTransformList (" + attr + "): swapping two transform functions keeps both held items");++ test(() => {+ const el = build("translate(1,2)");+ const list = listOf(el);+ const held = list.getItem(0);+ if (attr === "transform")+ el.setAttribute("transform", "none");+ else+ el.removeAttribute(attr);+ assert_equals(list.numberOfItems, 0, "numberOfItems");+ assert_equals(held.matrix.e, 1, "the detached item keeps its value");+ }, "SVGTransformList (" + attr + "): an empty list detaches every item");+}++// The DOMString branch, step 5, is deliberately the other way round: the list is+// replaced rather than updated in place. Without this the object branch could be+// satisfied by an engine that never replaces anything.+test(() => {+ const el = document.createElementNS(SVGNS, "g");+ el.setAttribute("systemLanguage", "en,fr,de");+ stage.appendChild(el);+ const list = el.systemLanguage;+ const before = list.getItem(0);+ el.setAttribute("systemLanguage", "it,es,pt");+ assert_equals(list.numberOfItems, 3, "numberOfItems");+ assert_equals(list.getItem(0), "it", "index 0");+ assert_equals(list.getItem(1), "es", "index 1");+ assert_equals(list.getItem(2), "pt", "index 2");+ assert_not_equals(before, list.getItem(0), "the list was replaced");+}, "SVGStringList: a change replaces the list rather than updating items");+</script>diff --git a/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGPointList-error-handling.html b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGPointList-error-handling.htmlnew file mode 100644index 00000000000..05176f18ccc--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/svg/types/scripted/SVGPointList-error-handling.html@@ -0,0 +1,123 @@+<!DOCTYPE html>+<title>SVGPointList: error handling that does not depend on a valid prefix</title>+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/shapes.html#DataTypePoints">+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/shapes.html#PolylineElementPointsAttribute">+<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#TermInitialValue">+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<svg id="svg" width="200" height="200"></svg>+<script>+// w3c/svgwg#764 asks whether a points value that fails to parse should render the+// coordinate pairs before the error, as SVG 1.1 required, or nothing, which is what+// SVG 2 gives once the general initial-value rule applies. That question is open, so+// this file deliberately avoids it.+//+// What it covers is the part both answers agree on:+//+// * an odd number of coordinates, which SVG 2 keeps an explicit rule for and which+// matches SVG 1.1;+// * an error at or before the start of the list, where there is no valid prefix for+// the two readings to disagree about;+// * an empty or whitespace-only value, whose observable is the same whether it is+// treated as valid-and-empty or as invalid.+//+// Both layers are asserted together on every row. Nothing else checks that+// points.numberOfItems and the rendered geometry agree, and they are what a partial+// parse would put out of step.+//+// A value with an error AFTER at least one complete coordinate pair is intentionally+// absent from this file until svgwg#764 resolves.++const svg = document.getElementById("svg");+const ELEMENTS = ["polyline", "polygon"];++function shape(tag, points) {+ const element = document.createElementNS("http://www.w3.org/2000/svg", tag);+ if (points !== null)+ element.setAttribute("points", points);+ element.setAttribute("fill", "none");+ svg.append(element);+ return element;+}++function assertRendersNothing(element, description) {+ assert_equals(element.points.numberOfItems, 0, description + ": numberOfItems");+ assert_throws_dom("IndexSizeError", () => element.points.getItem(0),+ description + ": getItem(0)");+ const bbox = element.getBBox();+ assert_equals(bbox.width, 0, description + ": bbox width");+ assert_equals(bbox.height, 0, description + ": bbox height");+}++for (const tag of ELEMENTS) {+ test(function() {+ const errored = shape(tag, "10,10 70,10 40,50 20");+ const truncated = shape(tag, "10,10 70,10 40,50");++ // Guard against a vacuous comparison of two empty shapes.+ assert_equals(truncated.points.numberOfItems, 3, "the truncated list has 3 items");+ assert_greater_than(truncated.getBBox().width, 0, "the truncated shape has width");++ assert_equals(errored.points.numberOfItems, 3, "numberOfItems");+ assert_equals(errored.points.getItem(0).x, 10, "getItem(0).x");+ assert_equals(errored.points.getItem(0).y, 10, "getItem(0).y");++ const a = errored.getBBox();+ const b = truncated.getBBox();+ assert_equals(a.x, b.x, "bbox x");+ assert_equals(a.y, b.y, "bbox y");+ assert_equals(a.width, b.width, "bbox width");+ assert_equals(a.height, b.height, "bbox height");+ }, tag + " with an odd number of coordinates drops the last one and keeps the rest");++ test(function() {+ assertRendersNothing(shape(tag, "bogus 10,10 70,10 40,50"),+ "non-numeric token before any coordinate");+ }, tag + " whose points value begins with a non-numeric token renders nothing");++ test(function() {+ assertRendersNothing(shape(tag, ",10,10 70,10 40,50"),+ "separator before the first coordinate");+ }, tag + " whose points value begins with a separator renders nothing");++ test(function() {+ assertRendersNothing(shape(tag, ","), "a separator alone");+ }, tag + " with a points value of a single separator renders nothing");++ test(function() {+ const element = shape(tag, "");++ assert_equals(element.points.numberOfItems, 0, "numberOfItems");+ const bbox = element.getBBox();+ assert_equals(bbox.width, 0, "bbox width");+ assert_equals(bbox.height, 0, "bbox height");+ }, tag + " with an empty points value renders nothing");++ test(function() {+ const element = shape(tag, " ");++ assert_equals(element.points.numberOfItems, 0, "numberOfItems");+ const bbox = element.getBBox();+ assert_equals(bbox.width, 0, "bbox width");+ assert_equals(bbox.height, 0, "bbox height");+ }, tag + " with a whitespace-only points value renders nothing");++ test(function() {+ const element = shape(tag, null);++ assert_equals(element.getAttribute("points"), null, "the attribute is absent");+ assert_equals(element.points.numberOfItems, 0, "numberOfItems");+ const bbox = element.getBBox();+ assert_equals(bbox.width, 0, "bbox width");+ assert_equals(bbox.height, 0, "bbox height");+ }, tag + " with no points attribute renders nothing");++ test(function() {+ const points = "bogus 10,10 70,10 40,50";+ const element = shape(tag, points);++ assert_equals(element.getAttribute("points"), points,+ "the content attribute keeps what was specified");+ }, tag + " with a points value in error does not rewrite the content attribute");+}+</script>