Adjust ref for wpt/svg/struct/reftests/currentScale-change-repaint.html
Use the reference/green-100x100.html so that we get the correct margin.
Add a equivalent test for the standalone case.
Bug: 1368167
Change-Id: I9078796ef18dfc7d9a3a3bdecc42d4d2a95c16d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4033974
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1073285}
diff --git a/svg/struct/reftests/currentScale-change-repaint.html b/svg/struct/reftests/currentScale-change-repaint.html
index bd2773b..aa3939c 100644
--- a/svg/struct/reftests/currentScale-change-repaint.html
+++ b/svg/struct/reftests/currentScale-change-repaint.html
@@ -1,16 +1,14 @@
<!doctype HTML>
-<head>
- <meta charset="utf-8">
- <title>Testcase for changing currentScale on SVG embedded in HTML</title>
- <link rel="help" href="https://www.w3.org/TR/SVG/struct.html#__svg__SVGSVGElement__currentScale">
- <link rel="match" href="reference/green-100x100.svg"/>
- <script>
- function go() {
- var mySVG = document.getElementById("mySVG");
- mySVG.currentScale = 0.5;
- }
- </script>
-</head>
+<meta charset="utf-8">
+<title>Testcase for changing currentScale on SVG embedded in HTML</title>
+<link rel="help" href="https://www.w3.org/TR/SVG/struct.html#__svg__SVGSVGElement__currentScale">
+<link rel="match" href="reference/green-100x100.html">
+<script>
+ function go() {
+ const mySVG = document.getElementById("mySVG");
+ mySVG.currentScale = 0.5;
+ }
+</script>
<body onload="go()">
<svg id="mySVG">
<rect width="100" height="100" fill="green"></rect>
diff --git a/svg/struct/reftests/currentScale.svg b/svg/struct/reftests/currentScale.svg
new file mode 100644
index 0000000..926117b
--- /dev/null
+++ b/svg/struct/reftests/currentScale.svg
@@ -0,0 +1,11 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" onload="scaleDown()">
+ <title>Testcase for changing currentScale on SVG embedded in HTML</title>
+ <h:link rel="help" href="https://www.w3.org/TR/SVG/struct.html#__svg__SVGSVGElement__currentScale"/>
+ <h:link rel="match" href="reference/green-100x100.svg"/>
+ <script>
+ function scaleDown() {
+ document.documentElement.currentScale = 0.5;
+ }
+ </script>
+ <rect width="200" height="200" fill="green"/>
+</svg>