summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/simpletest.css19
-rw-r--r--modules/simpletest/simpletest.pages.inc4
-rw-r--r--modules/simpletest/tests/form.test3
-rw-r--r--modules/simpletest/tests/form_test.module5
4 files changed, 29 insertions, 2 deletions
diff --git a/modules/simpletest/simpletest.css b/modules/simpletest/simpletest.css
index 5cfedc68c..dab817178 100644
--- a/modules/simpletest/simpletest.css
+++ b/modules/simpletest/simpletest.css
@@ -71,3 +71,22 @@ div.simpletest-image {
display: inline;
cursor: pointer;
}
+
+a.simpletest-collapse {
+ height: 0;
+ width: 0;
+ top: -99em;
+ position: absolute;
+
+}
+
+a.simpletest-collapse:focus,
+a.simpletest-collapse:hover {
+ font-size: 80%;
+ top: 0px;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ position: relative;
+ z-index: 1000;
+} \ No newline at end of file
diff --git a/modules/simpletest/simpletest.pages.inc b/modules/simpletest/simpletest.pages.inc
index 990760497..c92926131 100644
--- a/modules/simpletest/simpletest.pages.inc
+++ b/modules/simpletest/simpletest.pages.inc
@@ -83,8 +83,8 @@ function theme_simpletest_test_table($variables) {
// Define the images used to expand/collapse the test groups.
$js = array(
'images' => array(
- theme('image', array('path' => 'misc/menu-collapsed.png', 'alt' => 'Expand', 'title' => 'Expand')),
- theme('image', array('path' => 'misc/menu-expanded.png', 'alt' => 'Collapsed', 'title' => 'Collapsed')),
+ theme('image', array('path' => 'misc/menu-collapsed.png', 'alt' => t('Expand'), 'title' => t('Expand'))) . ' <a href="#" class="simpletest-collapse">(' . t('Expand') . ')</a>',
+ theme('image', array('path' => 'misc/menu-expanded.png', 'alt' => t('Collapse'), 'title' => t('Collapse'))) . ' <a href="#" class="simpletest-collapse">(' . t('Collapse') . ')</a>',
),
);
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index b7dec7b6a..9dd5c9997 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -305,6 +305,9 @@ class FormsElementsLabelsTestCase extends DrupalWebTestCase {
$elements = $this->xpath('//input[@id="edit-form-textfield-test-title-after"]/following-sibling::label[@for="edit-form-textfield-test-title-after" and @class="option"]');
$this->assertTrue(isset($elements[0]), t("Label after field and label option class correct for text field."));
+ $elements = $this->xpath('//input[@id="edit-form-textfield-test-title-invisible"]/following-sibling::label[@for="edit-form-textfield-test-title-invisible" and @class="element-invisible"]');
+ $this->assertTrue(isset($elements[0]), t("Label after field and label class is element-invisible."));
+
$elements = $this->xpath('//label[@for="edit-form-textfield-test-title-no-show"]');
$this->assertFalse(isset($elements[0]), t("No label tag when title set not to display."));
}
diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module
index 54b6299f8..34d87c9c5 100644
--- a/modules/simpletest/tests/form_test.module
+++ b/modules/simpletest/tests/form_test.module
@@ -537,6 +537,11 @@ function form_label_test_form(&$form_state) {
'#title' => t('Textfield test for title after element'),
'#title_display' => 'after',
);
+ $form['form_textfield_test_title_invisible'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Textfield test for invisible title'),
+ '#title_display' => 'invisible',
+ );
// Textfield test for title set not to display
$form['form_textfield_test_title_no_show'] = array(
'#type' => 'textfield',