diff --git a/core/modules/simpletest/tests/form.test b/core/modules/simpletest/tests/form.test index 784da8849c9bae81542554339612c1217aa85810..6e40f1f9fc6165beaa6a3f3fd706e64ccae8f666 100644 --- a/core/modules/simpletest/tests/form.test +++ b/core/modules/simpletest/tests/form.test @@ -261,7 +261,7 @@ class FormsTestCase extends DrupalWebTestCase { // All the elements should be marked as disabled, including the ones below // the disabled container. - $this->assertEqual(count($disabled_elements), 33, t('The correct elements have the disabled property in the HTML code.')); + $this->assertEqual(count($disabled_elements), 34, t('The correct elements have the disabled property in the HTML code.')); $this->drupalPost(NULL, $edit, t('Submit')); $returned_values['hijacked'] = drupal_json_decode($this->content); @@ -390,14 +390,13 @@ class FormElementTestCase extends DrupalWebTestCase { } /** - * Tests placeholder text for textfield, password, and textarea. + * Tests placeholder text for elements that support placeholders. */ function testPlaceHolderText() { $this->drupalGet('form-test/placeholder-text'); $expected = 'placeholder-text'; - // Test to make sure textfields and passwords have the proper placeholder - // text. - foreach (array('textfield', 'password') as $type) { + // Test to make sure non-textarea elements have the proper placeholder text. + foreach (array('textfield', 'tel', 'password') as $type) { $element = $this->xpath('//input[@id=:id and @placeholder=:expected]', array( ':id' => 'edit-' . $type, ':expected' => $expected, diff --git a/core/modules/simpletest/tests/form_test.module b/core/modules/simpletest/tests/form_test.module index a2f1290cbf0c4560fa8772e6b130c4ed8fecfd30..76e5c260de3d62ce449ff21140cedb44c2c38acf 100644 --- a/core/modules/simpletest/tests/form_test.module +++ b/core/modules/simpletest/tests/form_test.module @@ -1196,7 +1196,7 @@ function _form_test_disabled_elements($form, &$form_state) { $form['disabled_container'] = array( '#disabled' => TRUE, ); - foreach (array('textfield', 'textarea', 'hidden') as $type) { + foreach (array('textfield', 'textarea', 'hidden', 'tel') as $type) { $form['disabled_container']['disabled_container_' . $type] = array( '#type' => $type, '#title' => $type,