File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -30,16 +30,18 @@ describe("Svg to Image", function () {
3030 '</svg>'
3131 ) ;
3232
33- svg2image . renderSvg ( twoColorSvg , null ) . then ( function ( image ) {
34- // This fails in Chrome & Safari, possibly due to a bug with same origin policy stuff
35- try {
36- expect ( image ) . toImageDiffEqual ( referenceImg ) ;
37- } catch ( err ) {
38- expect ( err . message ) . toBeNull ( ) ;
39- }
33+ referenceImg . onload = function ( ) {
34+ svg2image . renderSvg ( twoColorSvg , null ) . then ( function ( image ) {
35+ // This fails in Chrome & Safari, possibly due to a bug with same origin policy stuff
36+ try {
37+ expect ( image ) . toImageDiffEqual ( referenceImg ) ;
38+ } catch ( err ) {
39+ expect ( err . message ) . toBeNull ( ) ;
40+ }
4041
41- done ( ) ;
42- } ) ;
42+ done ( ) ;
43+ } ) ;
44+ } ;
4345 } ) ;
4446
4547 ifNotInWebkitIt ( "should render an SVG with inline image" , function ( done ) {
You can’t perform that action at this time.
0 commit comments