diff --git a/core/modules/user/lib/Drupal/user/Tests/UserUsernameTest.php b/core/modules/user/lib/Drupal/user/Tests/UserUsernameTest.php
new file mode 100644
index 0000000..3ba2608
--- /dev/null
+++ b/core/modules/user/lib/Drupal/user/Tests/UserUsernameTest.php
@@ -0,0 +1,134 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\user\Tests\UserUsernameTest.
+ */
+
+namespace Drupal\user\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests username functionality.
+ *
+ * @group user
+ */
+class UserUsernameTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array(
+    'node',
+    'block',
+    'comment_test',
+    'user_test_views',
+  );
+
+  /**
+   * The user with the shorter username.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $userShortName;
+
+  /**
+   * The user with the longer username.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $userLongName;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+
+    $this->drupalCreateContentType(array('type' => 'article'));
+
+    // Create user with short username.
+    $this->userShortName = $this->drupalCreateUser(
+      array(
+        'access content',
+        'access comments',
+        'post comments',
+        'skip comment approval',
+        'create article content',
+      ),
+      $this->randomName(30)
+    );
+
+    // Create user with long username.
+    $this->userLongName = $this->drupalCreateUser(
+      array(
+        'access content',
+        'access comments',
+        'post comments',
+        'skip comment approval',
+        'create article content',
+      ),
+      $this->randomName(31)
+    );
+  }
+
+  /**
+   * Tests author name display on nodes.
+   */
+  public function testTruncatedNodeAuthorName() {
+    // Test untruncated username.
+    $this->drupalLogin($this->userShortName);
+
+    $node = $this->drupalCreateNode(array('type' => 'article'));
+    $this->drupalGet('node/' . $node->id());
+    $this->assertText($this->userShortName->getUsername(), 'Untruncated username found.');
+
+    // Test truncated username.
+    $this->drupalLogin($this->userLongName);
+
+    $node = $this->drupalCreateNode(array('type' => 'article'));
+    $this->drupalGet('node/' . $node->id());
+    $this->assertNoText($this->userLongName->getUsername(), 'Untruncated username not found.');
+    $this->assertText(drupal_substr($this->userLongName->getUsername(), 0, 29) . '…', 'Truncated username found.');
+  }
+
+  /**
+   * Tests author name display on comments.
+   */
+  public function testTruncatedCommentAuthorName() {
+    $node = $this->drupalCreateNode(array('type' => 'article'));
+
+    $this->drupalLogin($this->userShortName);
+    $edit = array(
+      'comment_body[0][value]' => $this->randomString(),
+    );
+    $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $edit, t('Save'));
+    $this->assertText($this->userShortName->getUsername(), 'Untruncated username found.');
+    $this->drupalLogin($this->userLongName);
+    $edit = array(
+      'comment_body[0][value]' => $this->randomString(),
+    );
+    $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $edit, t('Save'));
+    $this->assertNoText($this->userLongName->getUsername(), 'Untruncated username not found.');
+    $this->assertText(drupal_substr($this->userLongName->getUsername(), 0, 29) . '…', 'Truncated username found.');
+  }
+
+
+  /**
+   * Tests username display in Who's New block.
+   */
+  public function testTruncatedWhosNewName() {
+    // Enable Who's New block.
+    $this->drupalPlaceBlock('views_block:who_s_new-block_1');
+
+    $this->drupalGet('<front>');
+
+    $this->assertText($this->userShortName->getUsername(), 'Untruncated username found.');
+    $this->assertNoText($this->userLongName->getUsername(), 'Untruncated username not found.');
+    $this->assertText(drupal_substr($this->userLongName->getUsername(), 0, 29) . '…', 'Truncated username found.');
+  }
+
+}
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 82aca31..de5136c 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -566,8 +566,8 @@ function template_preprocess_username(&$variables) {
   // their own shortening logic or add markup. If they do so, they must ensure
   // that $variables['name'] is safe for printing.
   $name = $variables['name_raw'] = $account->getUsername();
-  if (drupal_strlen($name) > 20) {
-    $name = Unicode::truncate($name, 15, FALSE, TRUE);
+  if (drupal_strlen($name) > 30) {
+    $name = Unicode::truncate($name, 29, FALSE, TRUE);
     $variables['truncated'] = TRUE;
   }
   else {
