diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php
index 0244f83..888fec0 100644
--- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php
+++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php
@@ -96,9 +96,16 @@ public function settingsForm(array $form, FormStateInterface $form_state, Editor
    * #element_validate handler for the "styles" element in settingsForm().
    */
   public function validateStylesValue(array $element, FormStateInterface $form_state) {
-    if ($this->generateStylesSetSetting($element['#value']) === FALSE) {
+    $styles_setting = $this->generateStylesSetSetting($element['#value']);
+    if ($styles_setting === FALSE) {
       $form_state->setError($element, t('The provided list of styles is syntactically incorrect.'));
     }
+    else {
+      $style_names = array_map(function ($style) { return $style['name']; }, $styles_setting);
+      if (count($style_names) !== count(array_unique($style_names))) {
+        $form_state->setError($element, t('Each style must have a unique label.'));
+      }
+    }
   }
 
   /**
diff --git a/core/modules/ckeditor/src/Tests/CKEditorStylesComboAdminTest.php b/core/modules/ckeditor/src/Tests/CKEditorStylesComboAdminTest.php
new file mode 100644
index 0000000..c114196
--- /dev/null
+++ b/core/modules/ckeditor/src/Tests/CKEditorStylesComboAdminTest.php
@@ -0,0 +1,151 @@
+<?php
+
+namespace Drupal\ckeditor\Tests;
+
+use Drupal\editor\Entity\Editor;
+use Drupal\simpletest\WebTestBase;
+use Drupal\filter\Entity\FilterFormat;
+
+/**
+ * Tests administration of the CKEditor StylesCombo plugin.
+ *
+ * @group ckeditor
+ */
+class CKEditorStylesComboAdminTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['filter', 'editor', 'ckeditor'];
+
+  /**
+   * A user with the 'administer filters' permission.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  protected function setUp() {
+    parent::setUp();
+
+    // Create text format.
+    $filtered_html_format = FilterFormat::create([
+      'format' => 'filtered_html',
+      'name' => 'Filtered HTML',
+      'weight' => 0,
+      'filters' => [],
+    ]);
+    $filtered_html_format->save();
+    $editor = Editor::create([
+      'format' => 'filtered_html',
+      'editor' => 'ckeditor',
+    ]);
+    $editor->save();
+
+    // Create admin user.
+    $this->adminUser = $this->drupalCreateUser(['administer filters']);
+  }
+
+  /**
+   * Tests StylesCombo settings for an existing text format.
+   */
+  function testExistingFormat() {
+    $ckeditor = $this->container->get('plugin.manager.editor')->createInstance('ckeditor');
+    $default_settings = $ckeditor->getDefaultSettings();
+
+    $this->drupalLogin($this->adminUser);
+    $this->drupalGet('admin/config/content/formats/manage/filtered_html');
+
+    // Ensure an Editor object exists, with the proper settings.
+    $expected_settings = $default_settings;
+    $editor = Editor::load('filtered_html');
+    $this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
+
+    // Case 1: Configure the Styles plugin with different labels for each style,
+    // and ensure the updated settings are saved.
+    $this->drupalGet('admin/config/content/formats/manage/filtered_html');
+    $edit = [
+      'editor[settings][plugins][stylescombo][styles]' => "h1.title|Title\np.callout|Callout\n\n",
+    ];
+    $this->drupalPostForm(NULL, $edit, t('Save configuration'));
+    $expected_settings['plugins']['stylescombo']['styles'] = "h1.title|Title\np.callout|Callout\n\n";
+    $editor = Editor::load('filtered_html');
+    $this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
+
+    // Case 2: Configure the Styles plugin with same labels for each style, and
+    // ensure that an error is displayed and that the updated settings are not
+    // saved.
+    $this->drupalGet('admin/config/content/formats/manage/filtered_html');
+    $edit = [
+      'editor[settings][plugins][stylescombo][styles]' => "h1.title|Title\np.callout|Title\n\n",
+    ];
+    $this->drupalPostForm(NULL, $edit, t('Save configuration'));
+    $this->assertRaw(t('Each style must have a unique label.'));
+    $expected_settings['plugins']['stylescombo']['styles'] = "h1.title|Title\np.callout|Callout\n\n";
+    $editor = Editor::load('filtered_html');
+    $this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
+  }
+
+  /**
+   * Tests StylesCombo settings for a new text format.
+   */
+  function testNewFormat() {
+    $this->drupalLogin($this->adminUser);
+    $this->drupalGet('admin/config/content/formats/add');
+
+    // Name our fancy new text format, select the "CKEditor" editor and click
+    // the "Configure" button.
+    $edit = [
+      'name' => 'Best text format ever',
+      'format' => 'best_format',
+      'editor[editor]' => 'ckeditor',
+    ];
+    $this->drupalPostAjaxForm(NULL, $edit, 'editor_configure');
+    $filter_format = FilterFormat::load('best_format');
+    $this->assertFalse($filter_format, 'No FilterFormat config entity exists yet.');
+    $editor = Editor::load('best_format');
+    $this->assertFalse($editor, 'No Editor config entity exists yet.');
+
+    // Ensure the toolbar buttons configuration value is initialized to the
+    // default value.
+    $ckeditor = $this->container->get('plugin.manager.editor')->createInstance('ckeditor');
+    $default_settings = $ckeditor->getDefaultSettings();
+
+    // Submit the form to create both a new text format and an associated text
+    // editor.
+    $this->drupalPostForm(NULL, $edit, t('Save configuration'));
+
+    // Ensure an Editor object exists now, with the proper settings.
+    $expected_settings = $default_settings;
+    $expected_settings['plugins']['stylescombo']['styles'] = '';
+    $editor = Editor::load('best_format');
+    $this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
+
+    // Case 1: Configure the Styles plugin with different labels for each style,
+    // and ensure the updated settings are saved.
+    $this->drupalGet('admin/config/content/formats/manage/best_format');
+    $edit = [
+      'editor[settings][plugins][stylescombo][styles]' => "h1.title|Title\np.callout|Callout\n\n",
+    ];
+    $this->drupalPostForm(NULL, $edit, t('Save configuration'));
+    $expected_settings['plugins']['stylescombo']['styles'] = "h1.title|Title\np.callout|Callout\n\n";
+    $editor = Editor::load('best_format');
+    $this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
+
+    // Case 2: Configure the Styles plugin with same labels for each style, and
+    // ensure that an error is displayed and that the updated settings are not
+    // saved.
+    $this->drupalGet('admin/config/content/formats/manage/best_format');
+    $edit = [
+      'editor[settings][plugins][stylescombo][styles]' => "h1.title|Title\np.callout|Title\n\n",
+    ];
+    $this->drupalPostForm(NULL, $edit, t('Save configuration'));
+    $this->assertRaw(t('Each style must have a unique label.'));
+    $expected_settings['plugins']['stylescombo']['styles'] = "h1.title|Title\np.callout|Callout\n\n";
+    $editor = Editor::load('best_format');
+    $this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
+  }
+
+}
