@@ -27,6 +27,15 @@ describe("url", function() {
27
27
test ( "background img absolute with root" , ".class { background: green url(/img.png) xyz }" , [
28
28
[ 1 , ".class { background: green url({./img.png}) xyz }" , "" ]
29
29
] , "?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/" ) ;
30
39
test ( "background img external" ,
31
40
".class { background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz }" , [
32
41
[ 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