diff --git a/core/modules/file/lib/Drupal/file/Tests/DownloadTest.php b/core/modules/file/lib/Drupal/file/Tests/DownloadTest.php
index e39b39c..7428826 100644
--- a/core/modules/file/lib/Drupal/file/Tests/DownloadTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/DownloadTest.php
@@ -56,30 +56,38 @@ function testPublicFileTransfer() {
   function testPrivateFileTransfer() {
     // Set file downloads to private so handler functions get called.
 
-    // Create a file.
-    $contents = $this->randomName(8);
-    $file = $this->createFile(NULL, $contents, 'private');
-    $url  = file_create_url($file->getFileUri());
+    for ($i = 0; $i < 2; $i++) {
+      // Create a file.
+      $contents = $this->randomName(8);
+      $file = $this->createFile(NULL, $contents, 'private');
+      $url  = file_create_url($file->getFileUri());
 
-    // Set file_test access header to allow the download.
-    file_test_set_return('download', array('x-foo' => 'Bar'));
-    $this->drupalGet($url);
-    $headers = $this->drupalGetHeaders();
-    $this->assertEqual($headers['x-foo'], 'Bar', 'Found header set by file_test module on private download.');
-    $this->assertResponse(200, 'Correctly allowed access to a file when file_test provides headers.');
-
-    // Test that the file transferred correctly.
-    $this->assertEqual($contents, $this->content, 'Contents of the file are correct.');
-
-    // Deny access to all downloads via a -1 header.
-    file_test_set_return('download', -1);
-    $this->drupalHead($url);
-    $this->assertResponse(403, 'Correctly denied access to a file when file_test sets the header to -1.');
-
-    // Try non-existent file.
-    $url = file_create_url('private://' . $this->randomName());
-    $this->drupalHead($url);
-    $this->assertResponse(404, 'Correctly returned 404 response for a non-existent file.');
+      // Set file_test access header to allow the download.
+      file_test_set_return('download', array('x-foo' => 'Bar'));
+      $this->drupalGet($url);
+      $this->assertEqual($this->drupalGetHeader('x-foo'), 'Bar', 'Found header set by file_test module on private download.');
+      $this->assertFalse($this->drupalGetHeader('x-drupal-cache'), 'Page cache is disabled on private file download.');
+      $this->assertResponse(200, 'Correctly allowed access to a file when file_test provides headers.');
+
+      // Test that the file transferred correctly.
+      $this->assertEqual($contents, $this->content, 'Contents of the file are correct.');
+
+      // Deny access to all downloads via a -1 header.
+      file_test_set_return('download', -1);
+      $this->drupalHead($url);
+      $this->assertResponse(403, 'Correctly denied access to a file when file_test sets the header to -1.');
+
+      // Try non-existent file.
+      $url = file_create_url('private://' . $this->randomName());
+      $this->drupalHead($url);
+      $this->assertResponse(404, 'Correctly returned 404 response for a non-existent file.');
+
+      // Turn on page caching and rerun the test.
+      $config = \Drupal::config('system.performance');
+      $config->set('cache.page.use_internal', 1);
+      $config->set('cache.page.max_age', 300);
+      $config->save();
+    }
   }
 
   /**
