Beging implementing reftests

This commit is contained in:
Niklas von Hertzen
2017-08-09 00:50:31 +08:00
parent 93f08c7547
commit 58d1bef3b6
163 changed files with 15221 additions and 14371 deletions

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>External content tests</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../test.js"></script>
<style>
body {
font-family: Arial;
}
</style>
<base href="http://www.google.com/" />
</head>
<body>
<h1>External image</h1>
<img src="http://www.google.com/logos/2011/gregormendel11-hp.jpg" style="border:5px solid black;" />
<h1>External image (using &lt;base&gt; href)</h1>
<img src="/logos/2011/gregormendel11-res.jpg" />
</body>
</html>

View File

@ -0,0 +1,16 @@
Window: [800, 600]
Rectangle: [0, 0, 800, 600] rgba(0,0,0,0)
Opacity: 1
Text: rgb(0,0,0) normal normal 700 32px Arial
[8, 22]: External
[143, 22]: image
Text: rgb(0,0,0) normal normal 700 32px Arial
[8, 278]: External
[143, 278]: image
[244, 278]: (using
[350, 278]: <base>
[469, 278]: href)
Shape: rgb(0,0,0) Path (Vector(x: 8, y: 80) > Vector(x: 439, y: 80) > Vector(x: 434, y: 85) > Vector(x: 13, y: 85))
Shape: rgb(0,0,0) Path (Vector(x: 439, y: 80) > Vector(x: 439, y: 253) > Vector(x: 434, y: 248) > Vector(x: 434, y: 85))
Shape: rgb(0,0,0) Path (Vector(x: 439, y: 253) > Vector(x: 8, y: 253) > Vector(x: 13, y: 248) > Vector(x: 434, y: 248))
Shape: rgb(0,0,0) Path (Vector(x: 8, y: 253) > Vector(x: 8, y: 80) > Vector(x: 13, y: 85) > Vector(x: 13, y: 248))

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>Image tests</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../test.js"></script>
<script type="text/javascript">
function setUp() {
if ($('#testcanvas')[0].getContext) {
var ctx = $('#testcanvas')[0].getContext('2d');
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
ctx.fillRect (30, 30, 55, 50);
} else {
$('#testcanvas').remove();
}
};
</script>
</head>
<body>
<canvas id="testcanvas" style="width:700px;height:300px;"></canvas>
</body>
</html>

View File

@ -0,0 +1,5 @@
Window: [800, 600]
Rectangle: [0, 0, 800, 600] rgba(0,0,0,0)
Opacity: 1
Clip: Path (Vector(x: 8, y: 8) > Vector(x: 708, y: 8) > Vector(x: 708, y: 308) > Vector(x: 8, y: 308))
Draw image: Canvas (source: [0, 0, 300, 150]) (destination: [0, 0, 300, 150])

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>External content tests</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
h2cOptions = {useCORS: true, proxy: null};
</script>
<script type="text/javascript" src="../../test.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body>
<h1>External image (CORS)</h1>
<img src="http://localhost:8081/tests/assets/image2.jpg" />
</body>
</html>

View File

@ -0,0 +1,7 @@
Window: [800, 600]
Rectangle: [0, 0, 800, 600] rgba(0,0,0,0)
Opacity: 1
Text: rgb(0,0,0) normal normal 700 32px Arial
[8, 22]: External
[143, 22]: image
[244, 22]: (CORS)

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Image tests</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../test.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body>
Image without src attribute, should not crash:
<img style="width:50px;height:50px;border:1px solid red;display:block;" />
Image with broken src attribute, should not crash:
<img src="404" style="width:50px;height:50px;border:1px solid red;display:block;" />
<img src="404_2" style="width:50px;height:50px;border:1px solid red;display:block;" />
</body>
</html>

View File

@ -0,0 +1,32 @@
Window: [800, 600]
Rectangle: [0, 0, 800, 600] rgba(0,0,0,0)
Opacity: 1
Text: rgb(0,0,0) normal normal 400 16px Arial
[8, 8]: Image
[57, 8]: without
[112, 8]: src
[138, 8]: attribute,
[204, 8]: should
[256, 8]: not
[283, 8]: crash:
Text: rgb(0,0,0) normal normal 400 16px Arial
[8, 78]: Image
[57, 78]: with
[90, 78]: broken
[143, 78]: src
[169, 78]: attribute,
[236, 78]: should
[287, 78]: not
[314, 78]: crash:
Shape: rgb(255,0,0) Path (Vector(x: 8, y: 26) > Vector(x: 60, y: 26) > Vector(x: 59, y: 27) > Vector(x: 9, y: 27))
Shape: rgb(255,0,0) Path (Vector(x: 60, y: 26) > Vector(x: 60, y: 78) > Vector(x: 59, y: 77) > Vector(x: 59, y: 27))
Shape: rgb(255,0,0) Path (Vector(x: 60, y: 78) > Vector(x: 8, y: 78) > Vector(x: 9, y: 77) > Vector(x: 59, y: 77))
Shape: rgb(255,0,0) Path (Vector(x: 8, y: 78) > Vector(x: 8, y: 26) > Vector(x: 9, y: 27) > Vector(x: 9, y: 77))
Shape: rgb(255,0,0) Path (Vector(x: 8, y: 96) > Vector(x: 60, y: 96) > Vector(x: 59, y: 97) > Vector(x: 9, y: 97))
Shape: rgb(255,0,0) Path (Vector(x: 60, y: 96) > Vector(x: 60, y: 148) > Vector(x: 59, y: 147) > Vector(x: 59, y: 97))
Shape: rgb(255,0,0) Path (Vector(x: 60, y: 148) > Vector(x: 8, y: 148) > Vector(x: 9, y: 147) > Vector(x: 59, y: 147))
Shape: rgb(255,0,0) Path (Vector(x: 8, y: 148) > Vector(x: 8, y: 96) > Vector(x: 9, y: 97) > Vector(x: 9, y: 147))
Shape: rgb(255,0,0) Path (Vector(x: 8, y: 148) > Vector(x: 60, y: 148) > Vector(x: 59, y: 149) > Vector(x: 9, y: 149))
Shape: rgb(255,0,0) Path (Vector(x: 60, y: 148) > Vector(x: 60, y: 200) > Vector(x: 59, y: 199) > Vector(x: 59, y: 149))
Shape: rgb(255,0,0) Path (Vector(x: 60, y: 200) > Vector(x: 8, y: 200) > Vector(x: 9, y: 199) > Vector(x: 59, y: 199))
Shape: rgb(255,0,0) Path (Vector(x: 8, y: 200) > Vector(x: 8, y: 148) > Vector(x: 9, y: 149) > Vector(x: 9, y: 199))

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>Image tests</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../test.js"></script>
</head>
<body>
<img src="../../assets/image.jpg" />
<img src="../../assets/image.jpg" style="width:50px;height:400px;" />
<img src="../../assets/image.jpg" style="width:500px;" />
<img src="../../assets/image.jpg" style="width:100px;border-radius:50px;" />
<img src="../../assets/image.jpg" style="width:500px;height:40px;" />
<img src="../../assets/image.jpg" style="padding:20px;border:5px solid black;" />
<img src="../../assets/image.jpg" style="padding-bottom:20px;border-top:5px solid black;clear:both;" />
<img src="../../assets/image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;" />
<img src="../../assets/image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;height:25px;" />
<img src="../../assets/image.jpg" style="width:0px;height:0px;border:1px solid black" />
<img src="../../assets/image.jpg" style="width:0px;height:0px;" />
</body>
</html>

View File

@ -0,0 +1,36 @@
Window: [800, 703]
Rectangle: [0, 0, 800, 703] rgba(0,0,0,0)
Opacity: 1
Clip: Path (Vector(x: 8, y: 433) > Vector(x: 83, y: 433) > Vector(x: 83, y: 508) > Vector(x: 8, y: 508))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Clip: Path (Vector(x: 87, y: 108) > Vector(x: 137, y: 108) > Vector(x: 137, y: 508) > Vector(x: 87, y: 508))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Clip: Path (Vector(x: 141, y: 8) > Vector(x: 641, y: 8) > Vector(x: 641, y: 508) > Vector(x: 141, y: 508))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Clip: Path (BezierCurve(x0: 645, y0: 458, x1: 695, y1: 408, cx0: 645, cy0: 430, cx1: 667, cy1: 408) > BezierCurve(x0: 695, y0: 408, x1: 745, y1: 458, cx0: 723, cy0: 408, cx1: 745, cy1: 430) > BezierCurve(x0: 745, y0: 458, x1: 695, y1: 508, cx0: 745, cy0: 486, cx1: 723, cy1: 508) > BezierCurve(x0: 695, y0: 508, x1: 645, y1: 458, cx0: 667, cy0: 508, cx1: 645, cy1: 486))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Clip: Path (Vector(x: 8, y: 597) > Vector(x: 508, y: 597) > Vector(x: 508, y: 637) > Vector(x: 8, y: 637))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Shape: rgb(0,0,0) Path (Vector(x: 512, y: 512) > Vector(x: 637, y: 512) > Vector(x: 632, y: 517) > Vector(x: 517, y: 517))
Shape: rgb(0,0,0) Path (Vector(x: 637, y: 512) > Vector(x: 637, y: 637) > Vector(x: 632, y: 632) > Vector(x: 632, y: 517))
Shape: rgb(0,0,0) Path (Vector(x: 637, y: 637) > Vector(x: 512, y: 637) > Vector(x: 517, y: 632) > Vector(x: 632, y: 632))
Shape: rgb(0,0,0) Path (Vector(x: 512, y: 637) > Vector(x: 512, y: 512) > Vector(x: 517, y: 517) > Vector(x: 517, y: 632))
Clip: Path (Vector(x: 517, y: 517) > Vector(x: 632, y: 517) > Vector(x: 632, y: 632) > Vector(x: 517, y: 632))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Shape: rgb(0,0,0) Path (Vector(x: 641, y: 537) > Vector(x: 716, y: 537) > Vector(x: 716, y: 542) > Vector(x: 641, y: 542))
Clip: Path (Vector(x: 641, y: 542) > Vector(x: 716, y: 542) > Vector(x: 716, y: 637) > Vector(x: 641, y: 637))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Shape: rgb(0,0,0) Path (Vector(x: 720, y: 562) > Vector(x: 770, y: 562) > Vector(x: 770, y: 567) > Vector(x: 720, y: 567))
Clip: Path (Vector(x: 720, y: 567) > Vector(x: 770, y: 567) > Vector(x: 770, y: 637) > Vector(x: 720, y: 637))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Shape: rgb(0,0,0) Path (Vector(x: 8, y: 641) > Vector(x: 58, y: 641) > Vector(x: 58, y: 646) > Vector(x: 8, y: 646))
Clip: Path (Vector(x: 8, y: 646) > Vector(x: 58, y: 646) > Vector(x: 58, y: 691) > Vector(x: 8, y: 691))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Shape: rgb(0,0,0) Path (Vector(x: 62, y: 689) > Vector(x: 64, y: 689) > Vector(x: 63, y: 690) > Vector(x: 63, y: 690))
Shape: rgb(0,0,0) Path (Vector(x: 64, y: 689) > Vector(x: 64, y: 691) > Vector(x: 63, y: 690) > Vector(x: 63, y: 690))
Shape: rgb(0,0,0) Path (Vector(x: 64, y: 691) > Vector(x: 62, y: 691) > Vector(x: 63, y: 690) > Vector(x: 63, y: 690))
Shape: rgb(0,0,0) Path (Vector(x: 62, y: 691) > Vector(x: 62, y: 689) > Vector(x: 63, y: 690) > Vector(x: 63, y: 690))
Clip: Path (Vector(x: 63, y: 690) > Vector(x: 63, y: 690) > Vector(x: 63, y: 690) > Vector(x: 63, y: 690))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])
Clip: Path (Vector(x: 68, y: 691) > Vector(x: 68, y: 691) > Vector(x: 68, y: 691) > Vector(x: 68, y: 691))
Draw image: Image ("/tests/assets/image.jpg") (source: [0, 0, 75, 75]) (destination: [0, 0, 75, 75])

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>Base64 svg</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../../test.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body>
<div>
Inline svg image: <br />
<img width="200" height="200" src="data:image/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjMwNiIgaGVpZ2h0PSIyOTYiPjxkZWZzIGlkPSJkZWZzNCIgLz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTYyLjQ2OTk1LC00NzcuMjg2MykiIGlkPSJsYXllcjEiPjxwYXRoIGQ9Im0gMzE0LjE1NzQ1LDQ4MS42OTU1OCBjIC01OS4yMDA4OSwwLjUzNzc0IC0xMTQuODA5NzksMzYuNzIyMTkgLTEzNy4zMTI1LDk1LjM0Mzc1IC0yOS4zOTEyOSw3Ni41NjY5MyA4LjgzOTMyLDE2Mi40NTI0NiA4NS40MDYyNSwxOTEuODQzNzUgbCAzNC4wMzEyNSwtODguNjg3NSBjIC0yMC4wNjc4LC03LjcxMzU4IC0zNC4zMTI1LC0yNy4xNTMyNCAtMzQuMzEyNSwtNDkuOTM3NSAwLC0yOS41NDcyMyAyMy45NTI3NywtNTMuNSA1My41LC01My41IDI5LjU0NzIzLDAgNTMuNSwyMy45NTI3NyA1My41LDUzLjUgMCwyMi43ODQyNiAtMTQuMjQ0Nyw0Mi4yMjM5MiAtMzQuMzEyNSw0OS45Mzc1IGwgMzQuMDMxMjUsODguNjg3NSBjIDM5LjI5MDg1LC0xNS4wODIzNCA3MC4zMjM5LC00Ni4xMTU0IDg1LjQwNjI1LC04NS40MDYyNSAyOS4zOTEyOSwtNzYuNTY2OTMgLTguODM5MzIsLTE2Mi40ODM3MSAtODUuNDA2MjUsLTE5MS44NzUgLTE3Ljk0NTM3LC02Ljg4ODU5IC0zNi40MDg1MywtMTAuMDcwODcgLTU0LjUzMTI1LC05LjkwNjI1IHoiIGlkPSJwYXRoMjgzMCIgc3R5bGU9ImZpbGw6IzQwYWE1NDtmaWxsLW9wYWNpdHk6MTtzdHJva2U6IzIwNTUyYTtzdHJva2Utd2lkdGg6Ny45OTk5OTk1MjtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1vcGFjaXR5OjE7c3Ryb2tlLWRhc2hhcnJheTpub25lIiAvPjwvZz48L3N2Zz4=" /></div>
</body>
</html>

View File

@ -0,0 +1,9 @@
Window: [800, 600]
Rectangle: [0, 0, 800, 600] rgba(0,0,0,0)
Opacity: 1
Text: rgb(0,0,0) normal normal 400 16px Arial
[8, 8]: Inline
[51, 8]: svg
[80, 8]: image:
Clip: Path (Vector(x: 8, y: 26) > Vector(x: 208, y: 26) > Vector(x: 208, y: 226) > Vector(x: 8, y: 226))
Draw image: Image ("/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53") (source: [0, 0, 306, 296]) (destination: [0, 0, 306, 296])

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Image tests</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../../test.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body>
SVG taints image:<br /> <!-- http://fi.wikipedia.org/wiki/Tiedosto:Svg.svg -->
<img src="../../../assets/image.svg" />
</body>
</html>

View File

@ -0,0 +1,9 @@
Window: [800, 600]
Rectangle: [0, 0, 800, 600] rgba(0,0,0,0)
Opacity: 1
Text: rgb(0,0,0) normal normal 400 16px Arial
[8, 8]: SVG
[46, 8]: taints
[89, 8]: image:
Clip: Path (Vector(x: 8, y: 26) > Vector(x: 666, y: 26) > Vector(x: 666, y: 363) > Vector(x: 8, y: 363))
Draw image: Image ("/tests/assets/image.svg") (source: [0, 0, 658, 337]) (destination: [0, 0, 658, 337])

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<title>Inline svg</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../../test.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body>
<div>
Inline svg image: <br />
<img width="200" height="200" src='data:image/svg+xml,<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="306" height="296"><defs id="defs4" /><g transform="translate(-162.46995,-477.2863)" id="layer1"><path d="m 314.15745,481.69558 c -59.20089,0.53774 -114.80979,36.72219 -137.3125,95.34375 -29.39129,76.56693 8.83932,162.45246 85.40625,191.84375 l 34.03125,-88.6875 c -20.0678,-7.71358 -34.3125,-27.15324 -34.3125,-49.9375 0,-29.54723 23.95277,-53.5 53.5,-53.5 29.54723,0 53.5,23.95277 53.5,53.5 0,22.78426 -14.2447,42.22392 -34.3125,49.9375 l 34.03125,88.6875 c 39.29085,-15.08234 70.3239,-46.1154 85.40625,-85.40625 29.39129,-76.56693 -8.83932,-162.48371 -85.40625,-191.875 -17.94537,-6.88859 -36.40853,-10.07087 -54.53125,-9.90625 z" id="path2830" style="fill:#40aa54;fill-opacity:1;stroke:#20552a;stroke-width:7.99999952;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></g></svg>' />
</div>
</body>
</html>

View File

@ -0,0 +1,7 @@
Window: [800, 600]
Rectangle: [0, 0, 800, 600] rgba(0,0,0,0)
Opacity: 1
Text: rgb(0,0,0) normal normal 400 16px Arial
[8, 8]: Inline
[51, 8]: svg
[80, 8]: image:

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<title>Native svg only</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
var noFabric = true;
</script>
<script type="text/javascript" src="../../../test.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body>
<div>
<img src="../../../assets/image.svg" />
<img width="200" height="200" src='data:image/svg+xml,<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="306" height="296"><defs id="defs4" /><g transform="translate(-162.46995,-477.2863)" id="layer1"><path d="m 314.15745,481.69558 c -59.20089,0.53774 -114.80979,36.72219 -137.3125,95.34375 -29.39129,76.56693 8.83932,162.45246 85.40625,191.84375 l 34.03125,-88.6875 c -20.0678,-7.71358 -34.3125,-27.15324 -34.3125,-49.9375 0,-29.54723 23.95277,-53.5 53.5,-53.5 29.54723,0 53.5,23.95277 53.5,53.5 0,22.78426 -14.2447,42.22392 -34.3125,49.9375 l 34.03125,88.6875 c 39.29085,-15.08234 70.3239,-46.1154 85.40625,-85.40625 29.39129,-76.56693 -8.83932,-162.48371 -85.40625,-191.875 -17.94537,-6.88859 -36.40853,-10.07087 -54.53125,-9.90625 z" id="path2830" style="fill:#40aa54;fill-opacity:1;stroke:#20552a;stroke-width:7.99999952;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></g></svg>' />
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="306" height="296" id="svg2">
<defs id="defs4"/>
<g transform="translate(-162.46995,-477.2863)" id="layer1">
<path d="m 314.15745,481.69558 c -59.20089,0.53774 -114.80979,36.72219 -137.3125,95.34375 -29.39129,76.56693 8.83932,162.45246 85.40625,191.84375 l 34.03125,-88.6875 c -20.0678,-7.71358 -34.3125,-27.15324 -34.3125,-49.9375 0,-29.54723 23.95277,-53.5 53.5,-53.5 29.54723,0 53.5,23.95277 53.5,53.5 0,22.78426 -14.2447,42.22392 -34.3125,49.9375 l 34.03125,88.6875 c 39.29085,-15.08234 70.3239,-46.1154 85.40625,-85.40625 29.39129,-76.56693 -8.83932,-162.48371 -85.40625,-191.875 -17.94537,-6.88859 -36.40853,-10.07087 -54.53125,-9.90625 z"
id="path2830"
style="fill:#40aa54;fill-opacity:1;stroke:#20552a;stroke-width:7.99999952;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
</g>
</svg>
<img width="200" height="200" src="data:image/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjMwNiIgaGVpZ2h0PSIyOTYiPjxkZWZzIGlkPSJkZWZzNCIgLz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTYyLjQ2OTk1LC00NzcuMjg2MykiIGlkPSJsYXllcjEiPjxwYXRoIGQ9Im0gMzE0LjE1NzQ1LDQ4MS42OTU1OCBjIC01OS4yMDA4OSwwLjUzNzc0IC0xMTQuODA5NzksMzYuNzIyMTkgLTEzNy4zMTI1LDk1LjM0Mzc1IC0yOS4zOTEyOSw3Ni41NjY5MyA4LjgzOTMyLDE2Mi40NTI0NiA4NS40MDYyNSwxOTEuODQzNzUgbCAzNC4wMzEyNSwtODguNjg3NSBjIC0yMC4wNjc4LC03LjcxMzU4IC0zNC4zMTI1LC0yNy4xNTMyNCAtMzQuMzEyNSwtNDkuOTM3NSAwLC0yOS41NDcyMyAyMy45NTI3NywtNTMuNSA1My41LC01My41IDI5LjU0NzIzLDAgNTMuNSwyMy45NTI3NyA1My41LDUzLjUgMCwyMi43ODQyNiAtMTQuMjQ0Nyw0Mi4yMjM5MiAtMzQuMzEyNSw0OS45Mzc1IGwgMzQuMDMxMjUsODguNjg3NSBjIDM5LjI5MDg1LC0xNS4wODIzNCA3MC4zMjM5LC00Ni4xMTU0IDg1LjQwNjI1LC04NS40MDYyNSAyOS4zOTEyOSwtNzYuNTY2OTMgLTguODM5MzIsLTE2Mi40ODM3MSAtODUuNDA2MjUsLTE5MS44NzUgLTE3Ljk0NTM3LC02Ljg4ODU5IC0zNi40MDg1MywtMTAuMDcwODcgLTU0LjUzMTI1LC05LjkwNjI1IHoiIGlkPSJwYXRoMjgzMCIgc3R5bGU9ImZpbGw6IzQwYWE1NDtmaWxsLW9wYWNpdHk6MTtzdHJva2U6IzIwNTUyYTtzdHJva2Utd2lkdGg6Ny45OTk5OTk1MjtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1vcGFjaXR5OjE7c3Ryb2tlLWRhc2hhcnJheTpub25lIiAvPjwvZz48L3N2Zz4=" /></div>
</body>
</html>

View File

@ -0,0 +1,7 @@
Window: [800, 656]
Rectangle: [0, 0, 800, 656] rgba(0,0,0,0)
Opacity: 1
Clip: Path (Vector(x: 8, y: 8) > Vector(x: 666, y: 8) > Vector(x: 666, y: 345) > Vector(x: 8, y: 345))
Draw image: Image ("/tests/assets/image.svg") (source: [0, 0, 658, 337]) (destination: [0, 0, 658, 337])
Clip: Path (Vector(x: 523, y: 445) > Vector(x: 723, y: 445) > Vector(x: 723, y: 645) > Vector(x: 523, y: 645))
Draw image: Image ("/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53") (source: [0, 0, 306, 296]) (destination: [0, 0, 306, 296])

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>SVG node</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../../test.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body><div>
SVG node image: <br/>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="306" height="296" id="svg2">
<defs id="defs4"/>
<g transform="translate(-162.46995,-477.2863)" id="layer1">
<path d="m 314.15745,481.69558 c -59.20089,0.53774 -114.80979,36.72219 -137.3125,95.34375 -29.39129,76.56693 8.83932,162.45246 85.40625,191.84375 l 34.03125,-88.6875 c -20.0678,-7.71358 -34.3125,-27.15324 -34.3125,-49.9375 0,-29.54723 23.95277,-53.5 53.5,-53.5 29.54723,0 53.5,23.95277 53.5,53.5 0,22.78426 -14.2447,42.22392 -34.3125,49.9375 l 34.03125,88.6875 c 39.29085,-15.08234 70.3239,-46.1154 85.40625,-85.40625 29.39129,-76.56693 -8.83932,-162.48371 -85.40625,-191.875 -17.94537,-6.88859 -36.40853,-10.07087 -54.53125,-9.90625 z"
id="path2830"
style="fill:#40aa54;fill-opacity:1;stroke:#20552a;stroke-width:7.99999952;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
</g>
</svg>
</div>
</body>
</html>

View File

@ -0,0 +1,7 @@
Window: [800, 600]
Rectangle: [0, 0, 800, 600] rgba(0,0,0,0)
Opacity: 1
Text: rgb(0,0,0) normal normal 400 16px Arial
[8, 8]: SVG
[46, 8]: node
[86, 8]: image: