diff -u b/includes/common.inc b/includes/common.inc --- b/includes/common.inc +++ b/includes/common.inc @@ -70,6 +70,11 @@ define('CSS_THEME', 100); /** + * The default group for JavaScript settings added to the page. + */ +define('JS_SETTING', -200); + +/** * The default group for JavaScript and jQuery libraries added to the page. */ define('JS_LIBRARY', -100); diff -u b/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test --- b/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -1233,9 +1233,8 @@ drupal_add_js(array('drupal' => 'rocks', 'dries' => 280342800), 'setting'); drupal_add_js('misc/jquery.js'); $javascript = drupal_add_js(); - debug($javascript['settings']); - $this->assertEqual(280342800, $javascript['settings']['data'][2]['dries'], t('JavaScript setting is set correctly.')); - $this->assertEqual('rocks', $javascript['settings']['data'][2]['drupal'], t('The other JavaScript setting is set correctly.')); + $this->assertEqual(280342800, $javascript['settings']['data'][3]['dries'], t('JavaScript setting is set correctly.')); + $this->assertEqual('rocks', $javascript['settings']['data'][3]['drupal'], t('The other JavaScript setting is set correctly.')); } /** only in patch2: unchanged: --- a/modules/simpletest/tests/ajax.test +++ b/modules/simpletest/tests/ajax.test @@ -192,6 +192,9 @@ class AJAXFrameworkTestCase extends AJAXTestCase { // string containing the SCRIPT tag, we also ensure that unexpected // JavaScript code, such as a jQuery.extend() that would potentially clobber // rather than properly merge settings, didn't accidentally get added. + debug($original_js); + debug($expected['js']); + debug($new_js); $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']))); }