@@ -27,6 +27,15 @@ describe("url", function() {
2727 test ( "background img absolute with root" , ".class { background: green url(/img.png) xyz }" , [
2828 [ 1 , ".class { background: green url({./img.png}) xyz }" , "" ]
2929 ] , "?root=." ) ;
30+ test ( "background img absolute with root" , ".class { background: green url(/img.png) xyz }" , [
31+ [ 1 , ".class { background: green url({./img.png}) xyz }" , "" ]
32+ ] , "?root=./" ) ;
33+ test ( "root with absolute url" , ".class { background: green url(/img.png) xyz }" , [
34+ [ 1 , ".class { background: green url(http://some.cdn.com/img.png) xyz }" , "" ]
35+ ] , "?root=http://some.cdn.com" ) ;
36+ test ( "root with absolute url with trailing slash" , ".class { background: green url(/img.png) xyz }" , [
37+ [ 1 , ".class { background: green url(http://some.cdn.com/img.png) xyz }" , "" ]
38+ ] , "?root=http://some.cdn.com/" ) ;
3039 test ( "background img external" ,
3140 ".class { background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz }" , [
3241 [ 1 , ".class { background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz }" , "" ]
0 commit comments