X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FCSSMinTest.php;h=6fa3acf81f5db5c88da8d0f822bcd5fb5f8eee98;hb=eafee4f0533c7a1fb05ca491e14a9c201805b598;hp=43c508695096c1af26c89b5f1bbd348e565383b0;hpb=596e959d23855643124ea0f6e395be5a2b436937;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/CSSMinTest.php b/tests/phpunit/includes/libs/CSSMinTest.php index 43c5086950..6fa3acf81f 100644 --- a/tests/phpunit/includes/libs/CSSMinTest.php +++ b/tests/phpunit/includes/libs/CSSMinTest.php @@ -147,9 +147,12 @@ class CSSMinTest extends MediaWikiTestCase { // Full paths start with http://localhost/w/. // Timestamps in output are replaced with 'timestamp'. - // data: URIs for red.gif and green.gif + // data: URIs for red.gif, green.gif, circle.svg $red = 'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAAAAAQABAAACAkQBADs='; $green = 'data:image/gif;base64,R0lGODlhAQABAIAAAACAADAAACwAAAAAAQABAAACAkQBADs='; + $svg = 'data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A' + . '%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%228%22%20height%3D' + . '%228%22%3E%0A%3Ccircle%20cx%3D%224%22%20cy%3D%224%22%20r%3D%222%22%2F%3E%0A%3C%2Fsvg%3E%0A'; return array( array( @@ -233,6 +236,11 @@ class CSSMinTest extends MediaWikiTestCase { 'foo { /* @embed */ background: url(large.png); }', "foo { background: url(http://localhost/w/large.png?timestamp); }", ), + array( + 'SVG files are embedded without base64 encoding and unnecessary IE 6 and 7 fallback', + 'foo { /* @embed */ background: url(circle.svg); }', + "foo { background: url($svg); }", + ), array( 'Two regular files in one rule', 'foo { background: url(red.gif), url(green.gif); }',