diff --git a/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php b/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php
index 4d1906e..a77c1e9 100644
--- a/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php
+++ b/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php
@@ -33,6 +33,11 @@ public function testGoTo() {
     // Test page contains some text.
     $this->assertSession()->pageTextContains('Test page text.');
 
+    // Check that returned plain text is correct.
+    $text = $this->getTextContent();
+    $this->assertTrue(strpos($text, 'Test page text.') !== FALSE);
+    $this->assertTrue(strpos($text, '</html>') === FALSE);
+
     // Response includes cache tags that we can assert.
     $this->assertSession()->responseHeaderEquals('X-Drupal-Cache-Tags', 'rendered');
 
