@@ -43,6 +43,7 @@ source product.
4343using System ;
4444using System . Collections . Generic ;
4545using iText . StyledXmlParser . Node . Impl . Jsoup . Node ;
46+ using iText . Svg ;
4647using iText . Svg . Css . Impl ;
4748using iText . Svg . Processors . Impl ;
4849using iText . Test ;
@@ -63,31 +64,25 @@ public virtual void SvgCssResolveMalformedXlinkTest() {
6364 IDictionary < String , String > attr = sr . ResolveStyles ( node , new SvgCssContext ( ) ) ;
6465 NUnit . Framework . Assert . AreEqual ( value , attr . Get ( "xlink:href" ) ) ;
6566 }
66-
67+
6768 [ NUnit . Framework . Test ]
6869 public virtual void SvgCssResolveDataXlinkTest ( ) {
6970 iText . StyledXmlParser . Jsoup . Nodes . Element jsoupImage = new iText . StyledXmlParser . Jsoup . Nodes . Element ( iText . StyledXmlParser . Jsoup . Parser . Tag
70- . ValueOf ( "image" ) , "" ) ;
71+ . ValueOf ( SvgConstants . Tags . IMAGE ) , "" ) ;
7172 iText . StyledXmlParser . Jsoup . Nodes . Attributes imageAttributes = jsoupImage . Attributes ( ) ;
7273 JsoupElementNode node = new JsoupElementNode ( jsoupImage ) ;
73-
7474 String value1 = "data:image/png;base64,iVBORw0KGgoAAAANSU" ;
7575 imageAttributes . Put ( new iText . StyledXmlParser . Jsoup . Nodes . Attribute ( "xlink:href" , value1 ) ) ;
76-
7776 SvgStyleResolver sr = new SvgStyleResolver ( new SvgProcessorContext ( new SvgConverterProperties ( ) ) ) ;
7877 IDictionary < String , String > attr = sr . ResolveStyles ( node , new SvgCssContext ( ) ) ;
7978 NUnit . Framework . Assert . AreEqual ( value1 , attr . Get ( "xlink:href" ) ) ;
80-
8179 String value2 = "data:...,." ;
8280 imageAttributes . Put ( new iText . StyledXmlParser . Jsoup . Nodes . Attribute ( "xlink:href" , value2 ) ) ;
83-
8481 sr = new SvgStyleResolver ( new SvgProcessorContext ( new SvgConverterProperties ( ) ) ) ;
8582 attr = sr . ResolveStyles ( node , new SvgCssContext ( ) ) ;
8683 NUnit . Framework . Assert . AreEqual ( value2 , attr . Get ( "xlink:href" ) ) ;
87-
8884 String value3 = "dAtA:...,." ;
8985 imageAttributes . Put ( new iText . StyledXmlParser . Jsoup . Nodes . Attribute ( "xlink:href" , value3 ) ) ;
90-
9186 sr = new SvgStyleResolver ( new SvgProcessorContext ( new SvgConverterProperties ( ) ) ) ;
9287 attr = sr . ResolveStyles ( node , new SvgCssContext ( ) ) ;
9388 NUnit . Framework . Assert . AreEqual ( value3 , attr . Get ( "xlink:href" ) ) ;
0 commit comments