Build a comprehensive testing suite for various paths for Drupal’s CSS cache. This should include

  • Source CSS files in various sub folders
    • Make sure that image URLs are changed correctly
    • Make sure that urls can be wrapped in quotes optionally
    • Make sure that paths relative to the host aren’t touched
    • Make sure that absolute paths aren’t touched
    • Make sure that paths like ../directory/../otherdir are evaluated correctly
    • Allow ./path/file.png notation
  • Make sure that @import rules are evaluated and the replaced by the actual file
    • Make sure that files aren’t imported twice (needs discussion)
    • Make sure that files import into @imported files also work correctly (i.e. check recursion)
    • Make sure that all image URLs are correctly rewritten like above (see http://drupal.org/node/265719)
  • Make sure that rewriting also works with $base_path != '/'
CommentFileSizeAuthor
#6 style-1.css_.txt1.36 KBsime
#6 style-2.css_.txt119 bytessime

Comments

kkaefer’s picture

Make sure that @import is supported correctly. This includes:

kkaefer’s picture

Make sure that all valid characters in a URL are allowed and don't break anything. Valid URIs are described at http://www.ietf.org/rfc/rfc2396.txt.

kkaefer’s picture

Note: that means that also characters like ; ' " etc. are allowed which might break some regular expressions.

kkaefer’s picture

Make sure that regular expressions allow whitespace whereever it is allowed.

kkaefer’s picture

Make sure that @import rules and url() references can also span multiple lines.

sime’s picture

StatusFileSize
new119 bytes
new1.36 KB

Here are some starting stylesheets for ./modules/simpletest/files/ which contain weird syntax.

Getting these RTBC is a good starting point. They could probably use some more examples though, but they are a good starting point.

sime’s picture

I'm postponed the following tests until the sample files are ready and commited:
http://drupal.org/node/296400#comment-988225
http://drupal.org/node/296391#comment-988227

sime’s picture

Status: Active » Needs review
catch’s picture

Status: Needs review » Needs work

This needs rerolling as a patch to the modules/simpletest/tests directory.

casey’s picture

Component: tests » base system
Issue tags: +CSS aggregation

tagging

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.