From 7faedbdd5f9d65058463274c7b5a408e15934063 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 8 Oct 2010 15:36:12 +0000 Subject: - Patch #460448 by sun: some CSS rules are broken once CSS aggregation is enabled. --- modules/simpletest/tests/common.test | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'modules/simpletest/tests') diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 43f4b5cc1..c63633ee7 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -862,11 +862,10 @@ class CascadingStylesheetsUnitTest extends DrupalUnitTestCase { /** * Tests basic CSS loading with and without optimization via drupal_load_stylesheet(). * - * This can be enhanced by adding additional CSS files with variant test cases. - * Currently, this is specifically testing to make sure that whitespace - * is treated with adequate respect (see http://drupal.org/node/472820) and - * that image paths in imported files are preserved (see - * http://drupal.org/node/265719). + * Known tests: + * - Retain white-space in selectors. (http://drupal.org/node/472820) + * - Proper URLs in imported files. (http://drupal.org/node/265719) + * - Retain pseudo-selectors. (http://drupal.org/node/460448) */ function testLoadCssBasic() { // Array of files to test living in 'simpletest/files/css_test_files/'. @@ -882,10 +881,16 @@ class CascadingStylesheetsUnitTest extends DrupalUnitTestCase { foreach ($testfiles as $file) { $expected = file_get_contents("$path/$file.unoptimized.css"); $unoptimized_output = drupal_load_stylesheet("$path/$file.unoptimized.css", FALSE); + $this->verbose('Expected:
' . $expected . '
' + . 'Actual:
' . $unoptimized_output . '
' + ); $this->assertEqual($unoptimized_output, $expected, t('Unoptimized CSS file has expected contents (@file)', array('@file' => $file))); $expected = file_get_contents("$path/$file.optimized.css"); $optimized_output = drupal_load_stylesheet("$path/$file", TRUE); + $this->verbose('Expected:
' . $expected . '
' + . 'Actual:
' . $optimized_output . '
' + ); $this->assertEqual($optimized_output, $expected, t('Optimized CSS file has expected contents (@file)', array('@file' => $file))); } } -- cgit v1.2.3