diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-02-28 22:11:46 -0800 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-02-28 22:11:46 -0800 |
commit | 4ac6433a74df2e4b443fa6a314adb3ad4a152d8b (patch) | |
tree | c5680ef3dd68f49b359937fb42e97061f7d49b42 /modules/simpletest/tests/ajax.test | |
parent | 0f8e2094a3cf33a8018ee394e56bad57b3d0f89c (diff) | |
download | brdo-4ac6433a74df2e4b443fa6a314adb3ad4a152d8b.tar.gz brdo-4ac6433a74df2e4b443fa6a314adb3ad4a152d8b.tar.bz2 |
Issue #967166 by effulgentsia, Cottser, no_commit_credit, KrisBulman: Fixed Content rendered via AJAX does not respect stylesheets removed in .info files.
Diffstat (limited to 'modules/simpletest/tests/ajax.test')
-rw-r--r-- | modules/simpletest/tests/ajax.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/simpletest/tests/ajax.test b/modules/simpletest/tests/ajax.test index 8e731b8e7..014a35042 100644 --- a/modules/simpletest/tests/ajax.test +++ b/modules/simpletest/tests/ajax.test @@ -195,6 +195,27 @@ class AJAXFrameworkTestCase extends AJAXTestCase { $this->assertEqual($new_js, $original_js + array($expected['js'] => 1), t('Page state now has the %js file.', array('%js' => $expected['js']))); $this->assertCommand($commands, array('data' => $expected_js_html), t('Page now has the %js file.', array('%js' => $expected['js']))); } + + /** + * Tests that overridden CSS files are not added during lazy load. + */ + function testLazyLoadOverriddenCSS() { + // The test theme overrides system.base.css without an implementation, + // thereby removing it. + theme_enable(array('test_theme')); + variable_set('theme_default', 'test_theme'); + + // This gets the form, and emulates an Ajax submission on it, including + // adding markup to the HEAD and BODY for any lazy loaded JS/CSS files. + $this->drupalPostAJAX('ajax_forms_test_lazy_load_form', array('add_files' => TRUE), array('op' => t('Submit'))); + + // Verify that the resulting HTML does not load the overridden CSS file. + // We add a "?" to the assertion, because Drupal.settings may include + // information about the file; we only really care about whether it appears + // in a LINK or STYLE tag, for which Drupal always adds a query string for + // cache control. + $this->assertNoText('system.base.css?', 'Ajax lazy loading does not add overridden CSS files.'); + } } /** |