summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test
index 039e975..4a5200c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test
@@ -65,5 +65,17 @@ class CtoolsCssTestCase extends DrupalWebTestCase {
$font_size = (strpos($filtered, 'font-size:12px;') !== FALSE);
$color = (strpos($filtered, 'color:blue') !== FALSE);
$this->assertTrue($font_size && $color, 'Multiple properties are merged.');
+
+ $css = '@import url("other.css");p {color: red;}';
+ $filtered = ctools_css_filter($css);
+ $other_css = (strpos($filtered, 'other.css') === FALSE);
+ $color = (strpos($filtered, 'color:red') !== FALSE);
+ $this->assertTrue($other_css && $color, 'CSS is properly sanitized.');
+
+ $css = ';p {color: red; font-size: 12px;}';
+ $filtered = ctools_css_filter($css);
+ $font_size = (strpos($filtered, 'font-size:12px;') !== FALSE);
+ $color = (strpos($filtered, 'color:red') !== FALSE);
+ $this->assertTrue($font_size && $color, 'Multiple properties are retained.');
}
}