diff --git a/tests/views_cache.test b/tests/views_cache.test
index f2e39c5..2a33157 100644
--- a/tests/views_cache.test
+++ b/tests/views_cache.test
@@ -5,6 +5,14 @@
  */
 
 module_load_include('test', 'views', 'tests/views_query');
+
+function views_preprocess_views_view(&$vars) {
+  if (!empty($vars['view']->add_cache_files)) {
+    drupal_add_css(drupal_get_path('module', 'overlay') .'/overlay-child.css');
+    drupal_add_js(drupal_get_path('module', 'overlay') .'/overlay-child.js');
+  }
+}
+
 /**
  * Basic test for pluggable caching.
  */
@@ -142,5 +150,27 @@ class ViewsCacheTest extends ViewsSqlTest {
     // Verify the result.
     $this->assertEqual(6, count($view->result), t('The number of returned rows match.'));
   }
+
+  /**
+   * Test css/js storing/restoring.
+   */
+  function testCssJsStoring() {
+    $view = $this->getBasicView();
+    $view->add_cache_files = TRUE;
+    $view->preview();
+    $view->destroy();
+    unset($view);
+
+
+    // Make a new request to take sure about that the css isn't added again.
+    $this->drupalGet('node');
+
+    // Re-execute the view and check whether the css was readded.
+    debug(drupal_add_js());
+    $view = $this->getBasicView();
+    $view->preview();
+    debug(drupal_add_js());
+
+  }
 }
 
