diff --git a/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php b/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php
index 2de84e9593..8e9c58d5c3 100644
--- a/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php
+++ b/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php
@@ -1,6 +1,8 @@
 <?php
 
 namespace Drupal\test_page_test\Controller;
+use Drupal\Core\Url;
+use Symfony\Component\HttpFoundation\RedirectResponse;
 use Symfony\Component\HttpKernel\Exception\HttpException;
 
 /**
@@ -108,4 +110,11 @@ public function renderPipeInLink() {
     return ['#markup' => '<a href="http://example.com">foo|bar|baz</a>'];
   }
 
+  /**
+   * Loads a page that does a redirect.
+   */
+  public function metaRefresh() {
+    return new RedirectResponse(Url::fromRoute('test_page_test.test_page', [], ['absolute' => TRUE])->toString(), 302);
+  }
+
 }
diff --git a/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml b/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml
index 5d84695f8b..e64a88d003 100644
--- a/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml
+++ b/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml
@@ -82,3 +82,11 @@ test_page_test.field_xpath:
     _form: '\Drupal\test_page_test\Form\TestForm'
   requirements:
     _access: 'TRUE'
+
+test_page_test.meta_refresh:
+  path: '/test-meta-refresh'
+  defaults:
+    _title: 'Page with a redirect'
+    _controller: '\Drupal\test_page_test\Controller\Test::metaRefresh'
+  requirements:
+    _access: 'TRUE'
diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
index 4a0e1956bf..e155fe6fab 100644
--- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
+++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
@@ -605,4 +605,22 @@ public function testLocalTimeZone() {
     $this->assertEquals('Australia/Sydney', $value);
   }
 
+  /**
+   * Tests redirecting using the checkForMetaRefresh method.
+   */
+  public function testCheckForMetaRefresh() {
+    // Disable following redirects in the client.
+    $this->getSession()->getDriver()->getClient()->followRedirects(FALSE);
+    // Set the maximumMetaRefreshCount to zero to make sure the redirect doesn't
+    // happen when doing a drupalGet.
+    $this->maximumMetaRefreshCount = 0;
+    $this->drupalGet('test-meta-refresh');
+    $this->assertNotEmpty($this->cssSelect('meta[http-equiv="refresh"]'));
+    // Allow one redirect to happen.
+    $this->maximumMetaRefreshCount = 1;
+    $this->checkForMetaRefresh();
+    // Check that we are now on the test page.
+    $this->assertSession()->pageTextContains('Test page text.');
+  }
+
 }
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 08d083f3e0..d880a7062b 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -1273,7 +1273,7 @@ protected function getTestMethodCaller() {
    *   Either the new page content or FALSE.
    */
   protected function checkForMetaRefresh() {
-    $refresh = $this->cssSelect('meta[http-equiv="Refresh"]');
+    $refresh = $this->cssSelect('meta[http-equiv="Refresh"], meta[http-equiv="refresh"]');
     if (!empty($refresh) && (!isset($this->maximumMetaRefreshCount) || $this->metaRefreshCount < $this->maximumMetaRefreshCount)) {
       // Parse the content attribute of the meta tag for the format:
       // "[delay]: URL=[page_to_redirect_to]".
