diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php
index 02bd8c2..aa43193 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php
@@ -53,12 +53,6 @@ function setUp() {
     // Ensure we have a node page to access.
     $this->node = $this->drupalCreateNode(array('title' => $this->randomName(255), 'uid' => $this->auth_user->id()));
 
-    // Enable page caching.
-    $config = config('system.performance');
-    $config->set('cache.page.use_internal', 1);
-    $config->set('cache.page.max_age', 300);
-    $config->save();
-
     // Enable access logging.
     config('statistics.settings')
       ->set('count_content_views', 1)
@@ -75,40 +69,38 @@ function setUp() {
    * Verifies request logging for cached and uncached pages.
    */
   function testLogging() {
+    global $base_url;
     $path = 'node/' . $this->node->id();
+    $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
+    $expected_library = drupal_get_path('module', 'statistics'). '/statistics.js';
+    $expected_settings = '"statistics":{"data":{"nid":"' . $this->node->nid . '"}';
     $expected = array(
       'title' => $this->node->label(),
       'path' => $path,
     );
 
-    // Verify logging of an uncached page.
+    // Verify logging scripts are not on a non-node page.
+    $this->drupalGet('node');
+    $this->assertNoRaw($expected_library, 'Statistics library JS not found on node page.');
+    $this->assertNoRaw($expected_settings, 'Statistics settings not found on node page.');
+
+    // Verify logging scripts are not on a non-existent node page.
+    $this->drupalGet('node/9999');
+    $this->assertNoRaw($expected_library, 'Statistics library JS not found on non-existent node page.');
+    $this->assertNoRaw($expected_settings, 'Statistics settings not found on non-existent node page.');
+
+    // Verify logging scripts are on a node page.
     $this->drupalGet($path);
-    // Manually calling statistics.php, simulating ajax behavior.
+    $this->assertRaw($expected_library, 'Found statistics library JS on node page.');
+    $this->assertRaw($expected_settings, 'Found statistics settings on node page.');
+
+    // Manually call statistics.php, simulating ajax behavior.
     $nid = $this->node->id();
     $post = http_build_query(array('nid' => $nid));
     $headers = array('Content-Type' => 'application/x-www-form-urlencoded');
-    global $base_url;
-    $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
     $this->client->post($stats_path, $headers, $post)->send();
-    $this->assertIdentical($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Testing an uncached page.');
     $node_counter = statistics_get($this->node->id());
     $this->assertIdentical($node_counter['totalcount'], '1');
 
-    // Verify logging of a cached page.
-    $this->drupalGet($path);
-    // Manually calling statistics.php, simulating ajax behavior.
-    $this->client->post($stats_path, $headers, $post)->send();
-    $this->assertIdentical($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Testing a cached page.');
-    $node_counter = statistics_get($this->node->id());
-    $this->assertIdentical($node_counter['totalcount'], '2');
-
-    // Test logging from authenticated users
-    $this->drupalLogin($this->auth_user);
-    $this->drupalGet($path);
-    // Manually calling statistics.php, simulating ajax behavior.
-    $this->client->post($stats_path, $headers, $post)->send();
-    $node_counter = statistics_get($this->node->id());
-    $this->assertIdentical($node_counter['totalcount'], '3');
-
   }
 }
