Fix Bug 604000: Correctly remove overflow attributes on marker, pattern, svg

This commit is contained in:
Jeff Schiller 2010-07-11 11:18:26 -07:00
parent b661e479ea
commit c17c689ae4
7 changed files with 69 additions and 4 deletions

View file

@ -4,6 +4,7 @@
# Test Harness for Scour
#
# Copyright 2010 Jeff Schiller
# Copyright 2010 Louis Simard
#
# This file is part of Scour, http://www.codedread.com/scour/
#
@ -1102,6 +1103,19 @@ class DoNotCommonizeAttributesOnReferencedElements(unittest.TestCase):
doc = scour.scourXmlFile('unittests/commonized-referenced-elements.svg')
self.assertEquals(doc.getElementsByTagName('circle')[0].getAttribute('fill'), '#0f0')
class DoNotRemoveOverflowVisibleOnMarker(unittest.TestCase):
def runTest(self):
doc = scour.scourXmlFile('unittests/overflow-marker.svg')
self.assertEquals(doc.getElementsByTagName('marker')[0].getAttribute('overflow'), 'visible')
self.assertEquals(doc.getElementsByTagName('marker')[1].getAttribute('overflow'), '')
class MarkerOnSvgElements(unittest.TestCase):
def runTest(self):
doc = scour.scourXmlFile('unittests/overflow-svg.svg')
self.assertEquals(doc.getElementsByTagName('svg')[0].getAttribute('overflow'), '')
self.assertEquals(doc.getElementsByTagName('svg')[1].getAttribute('overflow'), '')
self.assertEquals(doc.getElementsByTagName('svg')[2].getAttribute('overflow'), 'visible')
# TODO: write tests for --enable-viewboxing
# TODO; write a test for embedding rasters
# TODO: write a test for --disable-embed-rasters