diff --git a/core/modules/system/tests/modules/test_page_test/js/test_javascript.js b/core/modules/system/tests/modules/test_page_test/js/test_javascript.js
new file mode 100644
index 0000000000..b0150cf953
--- /dev/null
+++ b/core/modules/system/tests/modules/test_page_test/js/test_javascript.js
@@ -0,0 +1,14 @@
+(function ($, Drupal, settings) {
+  Drupal.behaviors.testJavascriptBehaviour = {
+    attach: function attach(context) {
+      // Does some interaction stuff.
+      const $link = $('a.testLink');
+      $link.click(function(e) {
+        e.preventDefault();
+        $.get(settings.basePath, function(result) {
+          $link.append('Hallo welt');
+        });
+      });
+    }
+  }
+})(jQuery, Drupal, drupalSettings);
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 e754eaf0c2..27a395f5bd 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
@@ -123,4 +123,13 @@ public function metaRefresh() {
     return new RedirectResponse(Url::fromRoute('test_page_test.test_page', [], ['absolute' => TRUE])->toString(), 302);
   }
 
+  /**
+   * Embeds some JS which says "Hallo welt".
+   */
+  public function testJavascript() {
+    $build['#markup'] = '<a class="testLink" href="http://example.com">click here</a>';
+    $build['#attached']['library'][] = 'test_page_test/test_javascript';  
+    return $build;
+  }
+
 }
diff --git a/core/modules/system/tests/modules/test_page_test/test_page_test.libraries.yml b/core/modules/system/tests/modules/test_page_test/test_page_test.libraries.yml
new file mode 100644
index 0000000000..00f6c8cd9d
--- /dev/null
+++ b/core/modules/system/tests/modules/test_page_test/test_page_test.libraries.yml
@@ -0,0 +1,8 @@
+test_javascript:
+  js:
+    js/test_javascript.js: {}
+  dependencies:
+    - core/jquery
+    - core/drupal
+    - core/drupalSettings
+
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 e64a88d003..ea7c1e39f7 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
@@ -90,3 +90,10 @@ test_page_test.meta_refresh:
     _controller: '\Drupal\test_page_test\Controller\Test::metaRefresh'
   requirements:
     _access: 'TRUE'
+
+test_page_test.test_javascript:
+  path: '/test-javascript'
+  defaults:
+    _controller: '\Drupal\test_page_test\Controller\Test::testJavascript'
+  requirements:
+    _access: 'TRUE'
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php
index d49d46ee6a..aa7fa75a3a 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php
@@ -145,6 +145,55 @@ protected function createScreenshot($filename, $set_background_color = TRUE) {
     file_put_contents($filename, $image);
   }
 
+  /**
+   * Marks the page to assist determining if the page has been reloaded.
+   */
+  protected function markCurrentPage() {
+    $string = $this->randomMachineName();
+    $script = <<<JS
+    window.Drupal = window.Drupal || {};
+    window.Drupal.testPageReloadMarker = "$string";
+JS;
+    $this->getSession()->executeScript($script);
+  }
+
+  /**
+   * Gets the string used to mark the current page.
+   *
+   * @return string
+   *   The string used to mark the current page, if it exists.
+   */
+  private function getCurrentPageMarker() {
+    try {
+      $script = <<<JS
+      (function() {
+        window.Drupal = window.Drupal || {};
+        return window.Drupal.testPageReloadMarker;
+      })();
+JS;
+      $string = $this->getSession()->evaluateScript($script);
+    }
+    catch (\Exception $e) {
+      // If the script fails, the current page is not marked.
+      $string = '';
+    }
+    return $string;
+  }
+
+  /**
+   * Asserts that the page has not been reloaded.
+   */
+  protected function assertPageNotReloaded() {
+    $this->assertNotEmpty($this->getCurrentPageMarker());
+  }
+
+  /**
+   * Asserts that the page has been reloaded.
+   */
+  protected function assertPageReloaded() {
+    $this->assertEmpty($this->getCurrentPageMarker());
+  }
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JavascriptTestBaseTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JavascriptTestBaseTest.php
new file mode 100644
index 0000000000..b02ad6793c
--- /dev/null
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JavascriptTestBaseTest.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Drupal\FunctionalJavascriptTests\Tests;
+
+use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
+
+/**
+ * @coversDefaultClass \Drupal\FunctionalJavascriptTests\JavascriptTestBase
+ *
+ * @group javascript
+ */
+class JavascriptTestBaseTest extends JavascriptTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['test_page_test'];
+
+  /**
+   * @covers ::markCurrentPage
+   * @covers ::assertPageReloaded
+   */
+  public function testAssertPageReloaded() {
+    $this->drupalGet('');
+    $this->markCurrentPage();
+
+    $this->drupalGet('');
+    $this->assertPageReloaded();
+  }
+
+  /**
+   * @covers ::markCurrentPage
+   * @covers ::assertPageNotReloaded
+   */
+  public function testAssertPageNotReloaded() {
+    $this->drupalGet('test-javascript');
+    $this->markCurrentPage();
+    $this->assertSession()->pageTextNotContains('Hallo welt');
+
+    $this->clickLink('click here');
+    $this->assertPageNotReloaded();
+    $this->assertSession()->pageTextContains('Hallo welt');
+  }
+
+}
