diff --git a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
index 520cb11..78adbbb 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
@@ -20,7 +20,7 @@ class ThemeTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('node', 'block', 'file');
+  public static $modules = array('system', 'node', 'block', 'file', 'system_region_test');
 
   public static function getInfo() {
     return array(
@@ -34,10 +34,12 @@ function setUp() {
     parent::setUp();
 
     $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+    $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
 
     $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'view the administration theme', 'administer themes', 'bypass node access', 'administer blocks'));
     $this->drupalLogin($this->admin_user);
     $this->node = $this->drupalCreateNode();
+    $this->node = $this->drupalCreateNode(array('title' => t('Hello, world!'), 'type' => 'article'),NODE_PROMOTED);
   }
 
   /**
@@ -262,4 +264,21 @@ function testInvalidTheme() {
     $this->assertText(t('This theme requires the base theme @base_theme to operate correctly.', array('@base_theme' => 'not_real_test_basetheme')));
     $this->assertText(t('This theme requires the theme engine @theme_engine to operate correctly.', array('@theme_engine' => 'not_real_engine')));
   }
+
+  /**
+   * Test that classes can be added into region.tpl.php via #attributes.
+   */
+  function testRegionClass() {
+    global $theme_key;
+
+    // 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';
+}
