diff --git includes/common.inc includes/common.inc
index 48493d2..cf88299 100644
--- includes/common.inc
+++ includes/common.inc
@@ -3493,8 +3493,17 @@ function _drupal_load_stylesheet($matches) {
   $filename = $matches[1];
   // Load the imported stylesheet and replace @import commands in there as well.
   $file = drupal_load_stylesheet($filename);
-  // Alter all url() paths, but not external.
-  return preg_replace('/url\(([\'"]?)(?![a-z]+:)([^\'")]+)[\'"]?\)?;/i', 'url(\1' . dirname($filename) . '/', $file);
+
+  // Determine the file's directory.
+  $directory = dirname($filename);
+  // If the file is in the current directory, make sure '.' doesn't appear in
+  // the url() path.
+  $directory = $directory == '.' ? '' : $directory .'/';
+
+  // Alter all internal url() paths. Leave external paths alone. We don't need
+  // to normalize absolute paths here (i.e. remove folder/... segments) because
+  // that will be done later.
+  return preg_replace('/url\s*\(([\'"]?)(?![a-z]+:|\/+)/i', 'url(\1'. $directory, $file);
 }
 
 /**
diff --git modules/simpletest/files/css_test_files/css_input_with_import.css modules/simpletest/files/css_test_files/css_input_with_import.css
new file mode 100644
index 0000000..87afcb3
--- /dev/null
+++ modules/simpletest/files/css_test_files/css_input_with_import.css
@@ -0,0 +1,30 @@
+
+
+@import "import1.css";
+@import "import2.css";
+
+body {
+  margin: 0;
+  padding: 0;
+  background: #edf5fa;
+  font: 76%/170% Verdana, sans-serif;
+  color: #494949;
+}
+
+.this .is .a .test {
+  font: 1em/100% Verdana, sans-serif;
+  color: #494949;
+}
+.this
+.is
+.a
+.test {
+font: 1em/100% Verdana, sans-serif;
+color: #494949;
+}
+
+textarea, select {
+  font: 1em/160% Verdana, sans-serif;
+  color: #494949;
+}
+
diff --git modules/simpletest/files/css_test_files/css_input_with_import.css.optimized.css modules/simpletest/files/css_test_files/css_input_with_import.css.optimized.css
new file mode 100644
index 0000000..60006c5
--- /dev/null
+++ modules/simpletest/files/css_test_files/css_input_with_import.css.optimized.css
@@ -0,0 +1,6 @@
+
+ul,select{font:1em/160% Verdana,sans-serif;color:#494949;}.ui-icon{background-image:url(images/icon.png);}
+p,select{font:1em/160% Verdana,sans-serif;color:#494949;}body{margin:0;padding:0;background:#edf5fa;font:76%/170% Verdana,sans-serif;color:#494949;}.this .is .a .test{font:1em/100% Verdana,sans-serif;color:#494949;}.this
+.is
+.a
+.test{font:1em/100% Verdana,sans-serif;color:#494949;}textarea,select{font:1em/160% Verdana,sans-serif;color:#494949;}
\ No newline at end of file
diff --git modules/simpletest/files/css_test_files/css_input_with_import.css.unoptimized.css modules/simpletest/files/css_test_files/css_input_with_import.css.unoptimized.css
new file mode 100644
index 0000000..4c905f5
--- /dev/null
+++ modules/simpletest/files/css_test_files/css_input_with_import.css.unoptimized.css
@@ -0,0 +1,30 @@
+
+
+
+
+
+body {
+  margin: 0;
+  padding: 0;
+  background: #edf5fa;
+  font: 76%/170% Verdana, sans-serif;
+  color: #494949;
+}
+
+.this .is .a .test {
+  font: 1em/100% Verdana, sans-serif;
+  color: #494949;
+}
+.this
+.is
+.a
+.test {
+font: 1em/100% Verdana, sans-serif;
+color: #494949;
+}
+
+textarea, select {
+  font: 1em/160% Verdana, sans-serif;
+  color: #494949;
+}
+
diff --git modules/simpletest/files/css_test_files/import1.css modules/simpletest/files/css_test_files/import1.css
new file mode 100644
index 0000000..3d5842e
--- /dev/null
+++ modules/simpletest/files/css_test_files/import1.css
@@ -0,0 +1,6 @@
+
+ul, select {
+  font: 1em/160% Verdana, sans-serif;
+  color: #494949;
+}
+.ui-icon{background-image: url(images/icon.png);}
\ No newline at end of file
diff --git modules/simpletest/files/css_test_files/import2.css modules/simpletest/files/css_test_files/import2.css
new file mode 100644
index 0000000..367eb57
--- /dev/null
+++ modules/simpletest/files/css_test_files/import2.css
@@ -0,0 +1,5 @@
+
+p, select {
+  font: 1em/160% Verdana, sans-serif;
+  color: #494949;
+}
diff --git modules/simpletest/tests/common.test modules/simpletest/tests/common.test
index a87fc37..37b9914 100644
--- modules/simpletest/tests/common.test
+++ modules/simpletest/tests/common.test
@@ -757,7 +757,9 @@ class CascadingStylesheetsUnitTest extends DrupalUnitTestCase {
    *
    * 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 (not arbitrarily removing linefeeds).
+   * 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).
    */
   function testLoadCssBasic() {
     // Array of files to test living in 'simpletest/files/css_test_files/'.
@@ -766,6 +768,7 @@ class CascadingStylesheetsUnitTest extends DrupalUnitTestCase {
     // - Optimized expected content: name.css.optimized.css
     $testfiles = array(
       'css_input_without_import.css',
+      'css_input_with_import.css'
     );
     $path = drupal_get_path('module', 'simpletest') . '/files/css_test_files';
     foreach ($testfiles as $file) {
