mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-11 05:05:23 +03:00
Fix #388: add test for color-prop-05-t-manual
This commit is contained in:
parent
9a3c7293f3
commit
ee31b069f3
@ -508,6 +508,8 @@
|
||||
A718CD4F1F45C28F00966E06 /* MDisplayLink_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD4B1F45C28F00966E06 /* MDisplayLink_macOS.swift */; };
|
||||
A718CD501F45C28F00966E06 /* MView_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD4C1F45C28F00966E06 /* MView_macOS.swift */; };
|
||||
A718CD521F45C2A400966E06 /* MBezierPath+Extension_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD511F45C2A400966E06 /* MBezierPath+Extension_macOS.swift */; };
|
||||
A74C81F12292B3940085A832 /* color-prop-05-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */; };
|
||||
A74C81F32292B45E0085A832 /* color-prop-05-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */; };
|
||||
A7E675561EC4213500BD9ECB /* NodeBoundsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */; };
|
||||
C410148E1F834D290022EE44 /* style.svg in Resources */ = {isa = PBXBuildFile; fileRef = C410148D1F834D280022EE44 /* style.svg */; };
|
||||
C4153A8F1F8793DE001BA5EE /* small-logo.png in Resources */ = {isa = PBXBuildFile; fileRef = C4153A8E1F8793DD001BA5EE /* small-logo.png */; };
|
||||
@ -923,6 +925,8 @@
|
||||
A718CD4B1F45C28F00966E06 /* MDisplayLink_macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MDisplayLink_macOS.swift; path = Source/platform/macOS/MDisplayLink_macOS.swift; sourceTree = SOURCE_ROOT; };
|
||||
A718CD4C1F45C28F00966E06 /* MView_macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MView_macOS.swift; path = Source/platform/macOS/MView_macOS.swift; sourceTree = SOURCE_ROOT; };
|
||||
A718CD511F45C2A400966E06 /* MBezierPath+Extension_macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "MBezierPath+Extension_macOS.swift"; path = "Source/platform/macOS/MBezierPath+Extension_macOS.swift"; sourceTree = SOURCE_ROOT; };
|
||||
A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-05-t-manual.svg"; sourceTree = "<group>"; };
|
||||
A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-05-t-manual.reference"; sourceTree = "<group>"; };
|
||||
A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NodeBoundsTests.swift; path = Bounds/NodeBoundsTests.swift; sourceTree = "<group>"; };
|
||||
C410148D1F834D280022EE44 /* style.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = style.svg; sourceTree = "<group>"; };
|
||||
C4153A8E1F8793DD001BA5EE /* small-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "small-logo.png"; sourceTree = "<group>"; };
|
||||
@ -1364,14 +1368,16 @@
|
||||
5B1AE18320B6A669007EECCB /* w3cSVGTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
421C664F2225196900DD73F5 /* color-prop-04-t-manual.svg */,
|
||||
4269F43D2257265700D91393 /* color-prop-04-t-manual.reference */,
|
||||
5B1AE22D20B6A669007EECCB /* color-prop-01-b-manual.reference */,
|
||||
5B1AE18A20B6A669007EECCB /* color-prop-01-b-manual.svg */,
|
||||
5B1AE22C20B6A669007EECCB /* color-prop-02-f-manual.reference */,
|
||||
5B1AE1C620B6A669007EECCB /* color-prop-02-f-manual.svg */,
|
||||
5B1AE1FA20B6A669007EECCB /* color-prop-03-t-manual.reference */,
|
||||
5B1AE20320B6A669007EECCB /* color-prop-03-t-manual.svg */,
|
||||
4269F43D2257265700D91393 /* color-prop-04-t-manual.reference */,
|
||||
421C664F2225196900DD73F5 /* color-prop-04-t-manual.svg */,
|
||||
A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */,
|
||||
A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */,
|
||||
5B1AE1D420B6A669007EECCB /* coords-coord-01-t-manual.reference */,
|
||||
5B1AE19A20B6A669007EECCB /* coords-coord-01-t-manual.svg */,
|
||||
5B1AE1B920B6A669007EECCB /* coords-coord-02-t-manual.reference */,
|
||||
@ -1810,6 +1816,7 @@
|
||||
5B1AE2B220B6A669007EECCB /* types-basic-01-f-manual.svg in Resources */,
|
||||
58944BDA20AC8A9A00657640 /* logo_base64.txt in Resources */,
|
||||
5B1AE2C520B6A669007EECCB /* coords-trans-02-t-manual.svg in Resources */,
|
||||
A74C81F12292B3940085A832 /* color-prop-05-t-manual.svg in Resources */,
|
||||
5B1AE26120B6A669007EECCB /* paths-data-13-t-manual.reference in Resources */,
|
||||
5B1AE24820B6A669007EECCB /* coords-coord-01-t-manual.svg in Resources */,
|
||||
5B1AE2B620B6A669007EECCB /* paths-data-04-t-manual.svg in Resources */,
|
||||
@ -1872,6 +1879,7 @@
|
||||
5B1AE2D720B6A669007EECCB /* coords-trans-04-t-manual.svg in Resources */,
|
||||
5B1AE2AC20B6A669007EECCB /* struct-use-12-f-manual.svg in Resources */,
|
||||
5B1AE28220B6A669007EECCB /* coords-coord-01-t-manual.reference in Resources */,
|
||||
A74C81F32292B45E0085A832 /* color-prop-05-t-manual.reference in Resources */,
|
||||
5B1AE23420B6A669007EECCB /* painting-control-03-f-manual.reference in Resources */,
|
||||
5B1AE26820B6A669007EECCB /* shapes-polyline-01-t-manual.svg in Resources */,
|
||||
5B1AE29A20B6A669007EECCB /* struct-frag-02-t-manual.svg in Resources */,
|
||||
|
@ -265,6 +265,10 @@ class MacawSVGTests: XCTestCase {
|
||||
validateJSON("color-prop-01-b-manual")
|
||||
}
|
||||
|
||||
func testColorProp05() {
|
||||
validateJSON("color-prop-05-t-manual")
|
||||
}
|
||||
|
||||
func testShapesEllipse01() {
|
||||
validateJSON("shapes-ellipse-01-t-manual")
|
||||
}
|
||||
|
88
MacawTests/w3cSVGTests/color-prop-05-t-manual.reference
Normal file
88
MacawTests/w3cSVGTests/color-prop-05-t-manual.reference
Normal file
@ -0,0 +1,88 @@
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 65280
|
||||
},
|
||||
"form" : {
|
||||
"h" : 150,
|
||||
"type" : "Rect",
|
||||
"w" : 150,
|
||||
"x" : 120,
|
||||
"y" : 60
|
||||
},
|
||||
"node" : "Shape"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
},
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 0
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 32,
|
||||
"weight" : "normal"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, 10, 340",
|
||||
"text" : "$Revision: 1.8 $"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
},
|
||||
{
|
||||
"form" : {
|
||||
"h" : 358,
|
||||
"type" : "Rect",
|
||||
"w" : 478,
|
||||
"x" : 1,
|
||||
"y" : 1
|
||||
},
|
||||
"node" : "Shape",
|
||||
"stroke" : {
|
||||
"cap" : "butt",
|
||||
"dashes" : [
|
||||
|
||||
],
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 0
|
||||
},
|
||||
"join" : "miter",
|
||||
"width" : 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"layout" : {
|
||||
"scalingMode" : "meet",
|
||||
"svgSize" : {
|
||||
"height" : "100.0%",
|
||||
"width" : "100.0%"
|
||||
},
|
||||
"viewBox" : {
|
||||
"h" : 360,
|
||||
"type" : "Rect",
|
||||
"w" : 480,
|
||||
"x" : 0,
|
||||
"y" : 0
|
||||
},
|
||||
"xAligningMode" : "mid",
|
||||
"yAligningMode" : "mid"
|
||||
},
|
||||
"node" : "Canvas"
|
||||
}
|
60
MacawTests/w3cSVGTests/color-prop-05-t-manual.svg
Normal file
60
MacawTests/w3cSVGTests/color-prop-05-t-manual.svg
Normal file
@ -0,0 +1,60 @@
|
||||
<svg version="1.1" baseProfile="tiny" id="svg-root"
|
||||
width="100%" height="100%" viewBox="0 0 480 360"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!--======================================================================-->
|
||||
<!--= SVG 1.1 2nd Edition Test Case =-->
|
||||
<!--======================================================================-->
|
||||
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
|
||||
<!--= Institute of Technology, European Research Consortium for =-->
|
||||
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
|
||||
<!--= All Rights Reserved. =-->
|
||||
<!--= See http://www.w3.org/Consortium/Legal/. =-->
|
||||
<!--======================================================================-->
|
||||
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
|
||||
template-version="1.4" reviewer="CL" author="CN" status="accepted"
|
||||
version="$Revision: 1.8 $" testname="$RCSfile: color-prop-05-t.svg,v $">
|
||||
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/color.html#ColorProperty">
|
||||
<p>
|
||||
Tests the color that is used for the currentColor value in the fill
|
||||
attribute when more than one color is specified.
|
||||
</p>
|
||||
<p>
|
||||
This is illustrated using a single rectangle that is a child of a group
|
||||
element. A fill is specified for the group element but not the
|
||||
rectangle. Colour is specifed for the rectangle and the group element.
|
||||
</p>
|
||||
</d:testDescription>
|
||||
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Run the test. No interaction required.</p>
|
||||
</d:operatorScript>
|
||||
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The test is passed if the user agent renders the rectangle with a green
|
||||
fill.
|
||||
</p>
|
||||
</d:passCriteria>
|
||||
</d:SVGTestCase>
|
||||
<title id="test-title">$RCSfile: color-prop-05-t.svg,v $</title>
|
||||
<defs>
|
||||
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
|
||||
<font-face-src>
|
||||
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
</defs>
|
||||
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
|
||||
<g fill="currentColor" color="lime">
|
||||
<rect x="120" y="60" width="150" height="150" color="red"/>
|
||||
</g>
|
||||
</g>
|
||||
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
|
||||
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
|
||||
</g>
|
||||
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
|
||||
<!-- comment out this watermark once the test is approved -->
|
||||
<!--<g id="draft-watermark">
|
||||
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
|
||||
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
|
||||
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
|
||||
</g>-->
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
Loading…
Reference in New Issue
Block a user