summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-12-25 16:56:54 -0500
committerDavid Rothstein <drothstein@gmail.com>2013-12-25 16:56:54 -0500
commit94a26aac1c7e280d4fa5953f6c0622b07bbff3bc (patch)
tree6707347159d68ba98a46155c3f3bd04b292bda34 /modules/simpletest
parent58081593e9d37eb17c687e6ab8a0eb3ec3d36d8a (diff)
downloadbrdo-94a26aac1c7e280d4fa5953f6c0622b07bbff3bc.tar.gz
brdo-94a26aac1c7e280d4fa5953f6c0622b07bbff3bc.tar.bz2
Issue #2040209 by WebEvt: CSS is truncated when aggregation is turned on.
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/tests/common.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 8694ff32e..856945f63 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -687,6 +687,31 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
}
/**
+ * Tests removing charset when rendering stylesheets with preprocessing on.
+ */
+ function testRenderRemoveCharsetPreprocess() {
+ $cases = array(
+ array(
+ 'asset' => '@charset "UTF-8";html{font-family:"sans-serif";}',
+ 'expected' => 'html{font-family:"sans-serif";}',
+ ),
+ // This asset contains extra \n character.
+ array(
+ 'asset' => "@charset 'UTF-8';\nhtml{font-family:'sans-serif';}",
+ 'expected' => "\nhtml{font-family:'sans-serif';}",
+ ),
+ );
+
+ foreach ($cases as $case) {
+ $this->assertEqual(
+ $case['expected'],
+ drupal_load_stylesheet_content($case['asset']),
+ 'CSS optimizing correctly removes the charset declaration.'
+ );
+ }
+ }
+
+ /**
* Tests rendering inline stylesheets with preprocessing off.
*/
function testRenderInlineNoPreprocess() {