diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
index 76edbcd..b16227c 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
@@ -304,4 +304,24 @@ function testDisableTheme() {
     $this->assertTrue($theme_list['seven']->status == 1, 'Admin theme is enabled.');
     $this->assertTrue($theme_list['stark']->status == 0, 'Stark is disabled.');
   }
+
+  /**
+   * Test that classes can be added into region.tpl.php via #attributes.
+   */
+  function testRegionClass() {
+    global $theme_key;
+    \Drupal::moduleHandler()->install(array('system', 'block', 'system_region_test'));
+    $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    $this->node = $this->drupalCreateNode(array('title' => t('Hello, world!'), 'type' => 'article'), NODE_PROMOTED);
+
+    // Explicitly set the default and admin themes.
+    $theme = 'bartik';
+    theme_enable(array($theme));
+    \Drupal::config('system.theme')->set('default', $theme)->save();
+    // Place a block.
+    $block = $this->drupalPlaceBlock('system_main_block');
+    \Drupal::service('router.builder')->rebuild();
+    $this->drupalGet('node/1');
+    $this->assertRaw('new_class', 'New class found.');
+  }
 }
diff --git a/core/modules/system/tests/modules/system_region_test/system_region_test.info.yml b/core/modules/system/tests/modules/system_region_test/system_region_test.info.yml
new file mode 100644
index 0000000..63e1e45
--- /dev/null
+++ b/core/modules/system/tests/modules/system_region_test/system_region_test.info.yml
@@ -0,0 +1,7 @@
+name: 'System region test'
+type: module
+description: 'Provides hook implementations for testing regions.'
+package: Testing
+version: VERSION
+core: 8.x
+hidden: true
diff --git a/core/modules/system/tests/modules/system_region_test/system_region_test.module b/core/modules/system/tests/modules/system_region_test/system_region_test.module
new file mode 100644
index 0000000..4302fd7
--- /dev/null
+++ b/core/modules/system/tests/modules/system_region_test/system_region_test.module
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @file
+ * Provides System module hook implementations for testing purposes.
+ */
+
+/**
+ * Add a classes can into region.tpl.php via #attributes.
+ */
+function bartik_preprocess_region(&$variables) {
+  $variables['attributes']['class'][] = 'new_class';
+}
