Procházet zdrojové kódy

Tests/LibWeb: Add ref test for SVG `<textPath>`s

MacDue před 1 rokem
rodič
revize
8b5d90734d

binární
Tests/LibWeb/Ref/reference/images/svg-textPath-ref.png


+ 15 - 0
Tests/LibWeb/Ref/reference/svg-textPath-ref.html

@@ -0,0 +1,15 @@
+<style>
+  * {
+    margin: 0;
+  }
+  body {
+    background-color: white;
+  }
+</style>
+<!-- To rebase:
+  1. Open svg-textPath.html in Ladybird
+  2. Resize the window till there's x and y scrollbars
+  3. Right click > "Take Full Screenshot"
+  4. Update the image below:
+-->
+<img src="./images/svg-textPath-ref.png">

+ 11 - 0
Tests/LibWeb/Ref/svg-textPath.html

@@ -0,0 +1,11 @@
+<link rel="match" href="reference/svg-textPath-ref.html" />
+<svg width="400" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
+  <path
+    id="path"
+    fill="none"
+    stroke="red"
+    d="M10,90 Q90,90 90,45 Q90,10 50,10 Q10,10 10,40 Q10,70 45,70 Q70,70 75,50" />
+  <text>
+    <textPath href="#path">Quick brown fox jumps over the lazy dog.</textPath>
+  </text>
+</svg>