Add unit tests for requiring a <g> in a <switch> if the original file has one.

This commit is contained in:
Cynthia Gauthier 2010-06-16 03:49:46 -04:00
parent bb1a38a7ad
commit c3982e28df
3 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:example="http://www.example.com/olfactory-feedback/0.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<switch>
<foreignObject requiredExtensions="http://www.example.com/olfactory-feedback/0.1" x="0" y="0" width="1" height="1">
<example:odor xlink:href="#odor1423">
</example:odor>
</foreignObject>
<g id="dsfargeg">
<rect width="300" height="200" fill="green" />
<circle cx="200" cy="100" r="50" fill="yellow" />
</g>
</switch>
<defs>
<example:odor id="odor1423" fill="grape"/>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 608 B

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:example="http://www.example.com/olfactory-feedback/0.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<switch>
<foreignObject requiredExtensions="http://www.example.com/olfactory-feedback/0.1" x="0" y="0" width="1" height="1">
<example:odor xlink:href="#odor1423">
</example:odor>
</foreignObject>
<g>
<rect width="300" height="200" fill="green" />
<circle cx="200" cy="100" r="50" fill="yellow" />
</g>
</switch>
<defs>
<example:odor id="odor1423" fill="grape"/>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 594 B