diff --git a/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php b/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
index 1c42936..1461404 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
@@ -42,6 +42,9 @@ function setUp() {
       'translate interface',
     ));
     $this->drupalLogin($this->admin_user);
+
+    // Configure 'admin' as front page, so we can test redirects.
+    \Drupal::config('system.site')->set('page.front', 'admin')->save();
   }
 
   /**
@@ -115,6 +118,8 @@ function testAdminPages() {
    */
   function testCompactMode() {
     $this->drupalGet('admin/compact/on');
+    $this->assertResponse(200, 'A valid page is returned after turning on compact mode.');
+    $this->assertUrl('<front>', array(), 'The user is redirected to the front page after turning on compact mode.');
     $this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'Compact mode turns on.');
     $this->drupalGet('admin/compact/on');
     $this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'Compact mode remains on after a repeat call.');
@@ -122,6 +127,8 @@ function testCompactMode() {
     $this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'Compact mode persists on new requests.');
 
     $this->drupalGet('admin/compact/off');
+    $this->assertResponse(200, 'A valid page is returned after turning on compact mode.');
+    $this->assertUrl('<front>', array(), 'The user is redirected to the front page after turning on compact mode.');
     $this->assertEqual($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'deleted', 'Compact mode turns off.');
     $this->drupalGet('admin/compact/off');
     $this->assertEqual($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'deleted', 'Compact mode remains off after a repeat call.');
