diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentUninstallTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentUninstallTest.php
new file mode 100644
index 0000000..4a5ace2
--- /dev/null
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentUninstallTest.php
@@ -0,0 +1,69 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\comment\Tests\CommentUninstallTest.
+ */
+
+namespace Drupal\comment\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests comment module uninstallation.
+ */
+class CommentUninstallTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('comment');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Comment uninstallation',
+      'description' => 'Tests comment module uninstallation.',
+      'group' => 'Comment',
+    );
+  }
+
+  /**
+   * Test if comment module uninstallation properly deletes the field.
+   */
+  function testCommentUninstallWithField() {
+    // Ensure that the field exists before uninstallation.
+    $field = field_info_field('comment_body');
+    $this->assertNotNull($field, 'The comment_body field exists.');
+
+    // Uninstall the comment module which should trigger field deletion.
+    $this->container->get('module_handler')->disable(array('comment'));
+    $this->container->get('module_handler')->uninstall(array('comment'));
+
+    // Check that the field is now deleted.
+    $field = field_info_field('comment_body');
+    $this->assertNull($field, 'The comment_body field has been deleted.');
+  }
+
+
+  /**
+   * Test if uninstallation succeeds if the field has been deleted beforehand.
+   */
+  function testCommentUninstallWithoutField() {
+    // Manually delete the comment_body field before module uninstallation.
+    $field = field_info_field('comment_body');
+    $this->assertNotNull($field, 'The comment_body field exists.');
+    $field->delete();
+
+    // Check that the field is now deleted.
+    $field = field_info_field('comment_body');
+    $this->assertNull($field, 'The comment_body field has been deleted.');
+
+    // Ensure that uninstallation succeeds even if the field has already been
+    // deleted manually beforehand.
+    $this->container->get('module_handler')->disable(array('comment'));
+    $this->container->get('module_handler')->uninstall(array('comment'));
+  }
+
+}
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumUninstallTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumUninstallTest.php
new file mode 100644
index 0000000..b32f404
--- /dev/null
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumUninstallTest.php
@@ -0,0 +1,69 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\forum\Tests\ForumUninstallTest.
+ */
+
+namespace Drupal\forum\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests forum module uninstallation.
+ */
+class ForumUninstallTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('forum');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Forum uninstallation',
+      'description' => 'Tests forum module uninstallation.',
+      'group' => 'Forum',
+    );
+  }
+
+  /**
+   * Test if forum module uninstallation properly deletes the field.
+   */
+  function testForumUninstallWithField() {
+    // Ensure that the field exists before uninstallation.
+    $field = field_info_field('taxonomy_forums');
+    $this->assertNotNull($field, 'The taxonomy_forums field exists.');
+
+    // Uninstall the forum module which should trigger field deletion.
+    $this->container->get('module_handler')->disable(array('forum'));
+    $this->container->get('module_handler')->uninstall(array('forum'));
+
+    // Check that the field is now deleted.
+    $field = field_info_field('taxonomy_forums');
+    $this->assertNull($field, 'The taxonomy_forums field has been deleted.');
+  }
+
+
+  /**
+   * Test if uninstallation succeeds if the field has been deleted beforehand.
+   */
+  function testForumUninstallWithoutField() {
+    // Manually delete the taxonomy_forums field before module uninstallation.
+    $field = field_info_field('taxonomy_forums');
+    $this->assertNotNull($field, 'The taxonomy_forums field exists.');
+    $field->delete();
+
+    // Check that the field is now deleted.
+    $field = field_info_field('taxonomy_forums');
+    $this->assertNull($field, 'The taxonomy_forums field has been deleted.');
+
+    // Ensure that uninstallation succeeds even if the field has already been
+    // deleted manually beforehand.
+    $this->container->get('module_handler')->disable(array('forum'));
+    $this->container->get('module_handler')->uninstall(array('forum'));
+  }
+
+}
