diff --git a/core/misc/states.js b/core/misc/states.js
index b90015c..75ffc6c 100644
--- a/core/misc/states.js
+++ b/core/misc/states.js
@@ -78,6 +78,20 @@
       // The "reference" variable is a comparison function.
       return reference(value);
     },
+   'Array': function (reference, value) {
+     // Make sure value is an array.
+     if (!(typeof(value) === 'object' && (value instanceof Array))) {
+       return false;
+     }
+     // We iterate through each value provided in the reference. If all of them
+     // exist in value array, we return true. Otherwise return false.
+     for (var key in reference) {
+       if (reference.hasOwnProperty(key) && value.indexOf(reference[key]) === -1) {
+         return false;
+       }
+     }
+     return true;
+   },
     'Number': function (reference, value) {
       // If "reference" is a number and "value" is a string, then cast reference
       // as a string before applying the strict comparison in compare(). Otherwise
diff --git a/core/modules/path/src/Tests/PathAliasTest.php b/core/modules/path/src/Tests/PathAliasTest.php
index 134f9d7..6d503f4 100644
--- a/core/modules/path/src/Tests/PathAliasTest.php
+++ b/core/modules/path/src/Tests/PathAliasTest.php
@@ -99,6 +99,26 @@ function testAdminAlias() {
     $this->assertNoText($node1->label(), 'Previous alias no longer works.');
     $this->assertResponse(404);
 
+    // Change the path alias, preview and then save the node.
+    $previous = $edit['alias'];
+    $this->drupalGet('node/' . $node1->nid . '/edit');
+
+    // Fill in node creation form and preview node.
+    $edit_node = array('path[alias]' => $this->randomName(8));
+    $edit['alias'] = $edit_node['path[alias]'];
+    $this->drupalPost('node/' . $node1->nid . '/edit', $edit_node, t('Preview'));
+
+    $this->drupalPost(NULL, $edit_node, t('Save'));
+
+    // Confirm that the new alias works.
+    $this->drupalGet($edit_node['path[alias]']);
+    $this->assertText($node1->title, 'New alias works after previewing and saving the node.');
+
+    // Make sure that previous alias no longer works.
+    $this->drupalGet($previous);
+    $this->assertNoText($node1->title, 'Old alias no longer works after previewing and saving the node.');
+    $this->assertResponse(404);
+
     // Create second test node.
     $node2 = $this->drupalCreateNode();
 
