summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/simpletest.js20
-rw-r--r--modules/simpletest/tests/common.test4
2 files changed, 12 insertions, 12 deletions
diff --git a/modules/simpletest/simpletest.js b/modules/simpletest/simpletest.js
index 91912599f..dc11cfca4 100644
--- a/modules/simpletest/simpletest.js
+++ b/modules/simpletest/simpletest.js
@@ -1,20 +1,20 @@
// $Id$
-(function($) {
+(function ($) {
/**
* Add the cool table collapsing on the testing overview page.
*/
Drupal.behaviors.simpleTestMenuCollapse = {
- attach: function(context, settings) {
+ attach: function (context, settings) {
var timeout = null;
// Adds expand-collapse functionality.
- $('div.simpletest-image').each(function() {
+ $('div.simpletest-image').each(function () {
direction = settings.simpleTest[$(this).attr('id')].imageDirection;
$(this).html(settings.simpleTest.images[direction]);
});
// Adds group toggling functionality to arrow images.
- $('div.simpletest-image').click(function() {
+ $('div.simpletest-image').click(function () {
var trs = $(this).parents('tbody').children('.' + settings.simpleTest[this.id].testClass);
var direction = settings.simpleTest[this.id].imageDirection;
var row = direction ? trs.size() - 1 : 0;
@@ -60,17 +60,17 @@ Drupal.behaviors.simpleTestMenuCollapse = {
* selected/deselected.
*/
Drupal.behaviors.simpleTestSelectAll = {
- attach: function(context, settings) {
- $('td.simpletest-select-all').each(function() {
+ attach: function (context, settings) {
+ $('td.simpletest-select-all').each(function () {
var testCheckboxes = settings.simpleTest['simpletest-test-group-' + $(this).attr('id')].testNames;
var groupCheckbox = $('<input type="checkbox" class="form-checkbox" id="' + $(this).attr('id') + '-select-all" />');
// Each time a single-test checkbox is checked or unchecked, make sure
// that the associated group checkbox gets the right state too.
- var updateGroupCheckbox = function() {
+ var updateGroupCheckbox = function () {
var checkedTests = 0;
for (var i = 0; i < testCheckboxes.length; i++) {
- $('#' + testCheckboxes[i]).each(function() {
+ $('#' + testCheckboxes[i]).each(function () {
if (($(this).attr('checked'))) {
checkedTests++;
}
@@ -80,7 +80,7 @@ Drupal.behaviors.simpleTestSelectAll = {
};
// Have the single-test checkboxes follow the group checkbox.
- groupCheckbox.change(function() {
+ groupCheckbox.change(function () {
var checked = !!($(this).attr('checked'));
for (var i = 0; i < testCheckboxes.length; i++) {
$('#' + testCheckboxes[i]).attr('checked', checked);
@@ -89,7 +89,7 @@ Drupal.behaviors.simpleTestSelectAll = {
// Have the group checkbox follow the single-test checkboxes.
for (var i = 0; i < testCheckboxes.length; i++) {
- $('#' + testCheckboxes[i]).change(function() {
+ $('#' + testCheckboxes[i]).change(function () {
updateGroupCheckbox();
});
}
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index a6ff854ba..735360eb8 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -493,7 +493,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
* Test adding inline scripts.
*/
function testAddInline() {
- $inline = 'jQuery(function(){});';
+ $inline = 'jQuery(function () { });';
$javascript = drupal_add_js($inline, array('type' => 'inline', 'scope' => 'footer'));
$this->assertTrue(array_key_exists('misc/jquery.js', $javascript), t('jQuery is added when inline scripts are added.'));
$data = end($javascript);
@@ -515,7 +515,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
* Test drupal_get_js() with a footer scope.
*/
function testFooterHTML() {
- $inline = 'jQuery(function(){});';
+ $inline = 'jQuery(function () { });';
drupal_add_js($inline, array('type' => 'inline', 'scope' => 'footer'));
$javascript = drupal_get_js('footer');
$this->assertTrue(strpos($javascript, $inline) > 0, t('Rendered JavaScript footer returns the inline code.'));