Remove redundant SVG namespace declarations and prefixes
This commit is contained in:
parent
6fce13b84f
commit
c9ecfc05a7
5 changed files with 162 additions and 2 deletions
13
testscour.py
13
testscour.py
|
|
@ -730,6 +730,19 @@ class ScourLengthsWithUnits(unittest.TestCase):
|
|||
self.assertEquals(r.getAttribute('height'), '50%',
|
||||
'Did not scour height attribute with unit')
|
||||
|
||||
class RemoveRedundantSvgNamespaceDeclaration(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/redundant-svg-namespace.svg').documentElement
|
||||
self.assertNotEquals( doc.getAttribute('xmlns:svg'), 'http://www.w3.org/2000/svg',
|
||||
'Redundant svg namespace declaration not removed')
|
||||
|
||||
class RemoveRedundantSvgNamespacePrefix(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/redundant-svg-namespace.svg').documentElement
|
||||
r = doc.getElementsByTagNameNS(SVGNS, 'rect')[1]
|
||||
self.assertEquals( r.tagName, 'rect',
|
||||
'Redundant svg: prefix not removed')
|
||||
|
||||
# TODO; write a test for embedding rasters
|
||||
# TODO: write a test for --disable-embed-rasters
|
||||
# TODO: write tests for --keep-editor-data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue