diff --git a/core/modules/block/block.test b/core/modules/block/block.test
index 4af6240..af5eeb1 100644
--- a/core/modules/block/block.test
+++ b/core/modules/block/block.test
@@ -844,3 +844,70 @@ class BlockHiddenRegionTestCase extends DrupalWebTestCase {
     $this->assertText('Search', t('Block was displayed on the front page.'));
   }
 }
+
+/**
+ * Tests that an active block assigned to an non-existing region will issue a warning message-
+ */
+class BlockInvalidRegionTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Blocks in invalid region',
+      'description' => 'Checks that an active block assigned to an non-existing region will issue a warning message and be disabled.',
+      'group' => 'Block',
+    );
+  }
+
+  function setUp() {
+    parent::setUp(array('block', 'block_test'));
+  }
+
+  /**
+   * Tests that a warning message will be issued when cache is cleared.
+   */
+  function testBlockInNotDisabledRegion() {
+
+    // Create administrative user.
+    $admin_user = $this->drupalCreateUser(array('administer site configuration', 'access administration pages'));
+    $this->drupalLogin($admin_user);
+
+    // Enable test block in default theme.
+    db_merge('block')
+      ->key(array(
+        'module' => 'block_test',
+        'delta' => 'test_html_id',
+        'theme' => variable_get('theme_default', 'bartik'),
+      ))
+      ->fields(array(
+        'status' => 1,
+        'weight' => -1,
+        'region' => 'invalid_region',
+        'pages' => '',
+        'cache' => -1,
+      ))
+      ->execute();
+
+	$this->drupalPost('/admin/config/development/performance', array(), 'Clear all caches');
+    $this->assertRaw(t('The block %info was assigned to the invalid region %region and has been disabled.', array('%info' => t('Test block html id'), '%region' => 'invalid_region')), t('Enabled block is in the invalid region and was disabled.'));
+
+    // Disable test block in default theme.
+    db_merge('block')
+      ->key(array(
+        'module' => 'block_test',
+        'delta' => 'test_html_id',
+        'theme' => variable_get('theme_default', 'bartik'),
+      ))
+      ->fields(array(
+        'status' => 0,
+        'weight' => -1,
+        'region' => 'invalid_region',
+        'pages' => '',
+        'cache' => -1,
+      ))
+      ->execute();
+
+    $this->drupalPost('/admin/config/development/performance', array(), 'Clear all caches');
+    $this->assertNoRaw(t('The block %info was assigned to the invalid region %region and has been disabled.', array('%info' => t('Test block html id'), '%region' => 'invalid_region')), t('Disabled block in the invalid region and was not disabled.'));
+
+  }
+
+}
\ No newline at end of file
