diff --git a/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test
index de50f2a..19e2146 100644
--- a/core/modules/taxonomy/taxonomy.test
+++ b/core/modules/taxonomy/taxonomy.test
@@ -1581,6 +1581,45 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase {
     $this->assertEqual($allowed_values[1]['vocabulary'], $new_name, t('Index 1: Machine name was updated correctly.'));
     $this->assertEqual($allowed_values[2]['vocabulary'], 'foo', t('Index 2: Machine name was left untouched.'));
   }
+
+  /**
+   * Tests autocreation of default value terms in autocomplete widgets.
+   */
+   function testTaxonomyTermFieldAutocompleteDefault() {
+    // Set up an admin user to create the field.
+    $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access', 'administer content types'));
+    $this->drupalLogin($this->admin_user);
+
+    // Add a new term reference field with autocomplete.
+    $this->drupalGet('admin/structure/types/manage/page/fields');
+    $label = 'Test of taxonomy autocompletion';
+    $edit = array(
+      'fields[_add_new_field][label]' => $label,
+      'fields[_add_new_field][field_name]' => 'field_test',
+      'fields[_add_new_field][type]' => 'taxonomy_term_reference',
+      'fields[_add_new_field][widget_type]' => 'taxonomy_autocomplete',
+    );
+    $this->drupalPost(NULL, $edit, t('Save'));
+    $this->assertRaw(t('These settings apply to the %name field everywhere it is used.', array('%name' => $label)), 'Created field successfully');
+
+    // Assign the field to a vocabulary.
+    $edit = array();
+    $edit['field[settings][allowed_values][0][vocabulary]'] = $this->vocabulary->machine_name;
+    $this->drupalPost(NULL, $edit, t('Save field settings'));
+    $this->assertRaw(t('Updated field %name field settings.', array('%name' => $label)) , 'Assigned field to vocabulary');
+
+    // Set a non-existent default value for the field.
+    $edit = array();
+    $edit['field_test[und]'] = 'Foo';
+    $this->drupalPost(NULL, $edit, t('Save settings'));
+    $this->assertRaw(t('Saved %name configuration.' , array('%name' => $label)), 'Added default value to term field');
+
+    // Try to create a node.
+    $edit = array();
+    $edit['title'] = $this->randomName();
+    $this->drupalPost('node/add/page', $edit, t('Save'));
+    $this->assertRaw(t('Basic page %title has been created.', array('%title' => $edit['title'])), 'Node created succesfully.');
+  }
 }
 
 /**
