diff --git a/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
similarity index 98%
rename from core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php
rename to core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
index 479a60046b..9187bf0c0d 100644
--- a/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\locale\Locale;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\language\Entity\ConfigurableLanguage;
 
 /**
@@ -11,7 +11,7 @@
  *
  * @group locale
  */
-class LocaleConfigTranslationImportTest extends WebTestBase {
+class LocaleConfigTranslationImportTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -206,7 +206,7 @@ public function testLocaleRemovalAndConfigOverridePreserve() {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textareas = $this->xpath('//textarea');
     $textarea = current($textareas);
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => '',
     ];
diff --git a/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
similarity index 96%
rename from core/modules/locale/src/Tests/LocaleConfigTranslationTest.php
rename to core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
index a90dce0c54..cfef00852f 100644
--- a/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Core\Language\LanguageInterface;
 
 /**
@@ -10,7 +10,7 @@
  *
  * @group locale
  */
-class LocaleConfigTranslationTest extends WebTestBase {
+class LocaleConfigTranslationTest extends BrowserTestBase {
 
   /**
    * The language code used.
@@ -76,7 +76,7 @@ public function testConfigTranslation() {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textareas = $this->xpath('//textarea');
     $textarea = current($textareas);
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $message,
     ];
@@ -100,7 +100,7 @@ public function testConfigTranslation() {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textareas = $this->xpath('//textarea');
     $textarea = current($textareas);
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => 'D',
     ];
@@ -143,7 +143,7 @@ public function testConfigTranslation() {
     ];
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $image_style_label,
     ];
@@ -175,7 +175,7 @@ public function testConfigTranslation() {
     ];
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $category_label,
     ];
diff --git a/core/modules/locale/src/Tests/LocaleExportTest.php b/core/modules/locale/tests/src/Functional/LocaleExportTest.php
similarity index 97%
rename from core/modules/locale/src/Tests/LocaleExportTest.php
rename to core/modules/locale/tests/src/Functional/LocaleExportTest.php
index 54d36e2bc8..05621f6c13 100644
--- a/core/modules/locale/src/Tests/LocaleExportTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleExportTest.php
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the exportation of locale files.
  *
  * @group locale
  */
-class LocaleExportTest extends WebTestBase {
+class LocaleExportTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
diff --git a/core/modules/locale/src/Tests/LocaleFileSystemFormTest.php b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
similarity index 91%
rename from core/modules/locale/src/Tests/LocaleFileSystemFormTest.php
rename to core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
index 3ac296abe2..face32e69b 100644
--- a/core/modules/locale/src/Tests/LocaleFileSystemFormTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the locale functionality in the altered file settings form.
  *
  * @group locale
  */
-class LocaleFileSystemFormTest extends WebTestBase {
+class LocaleFileSystemFormTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
diff --git a/core/modules/locale/src/Tests/LocaleImportFunctionalTest.php b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
similarity index 99%
rename from core/modules/locale/src/Tests/LocaleImportFunctionalTest.php
rename to core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
index c1d9a612a9..e3a2c2612e 100644
--- a/core/modules/locale/src/Tests/LocaleImportFunctionalTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Core\Language\LanguageInterface;
 
 /**
@@ -10,7 +10,7 @@
  *
  * @group locale
  */
-class LocaleImportFunctionalTest extends WebTestBase {
+class LocaleImportFunctionalTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
diff --git a/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
similarity index 92%
rename from core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php
rename to core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
index fe99ce2f37..5b146b4cba 100644
--- a/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\Language\LanguageInterface;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Component\Utility\SafeMarkup;
 
 /**
@@ -11,7 +11,7 @@
  *
  * @group locale
  */
-class LocaleJavascriptTranslationTest extends WebTestBase {
+class LocaleJavascriptTranslationTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -21,7 +21,7 @@ class LocaleJavascriptTranslationTest extends WebTestBase {
   public static $modules = ['locale', 'locale_test'];
 
   public function testFileParsing() {
-    $filename = __DIR__ . '/../../tests/locale_test.js';
+    $filename = __DIR__ . '/../../locale_test.js';
 
     // Parse the file to look for source strings.
     _locale_parse_js_file($filename);
@@ -138,8 +138,9 @@ public function testLocaleTranslationJsDependencies() {
     $js_translation_files = \Drupal::state()->get('locale.translation.javascript');
     $js_filename = $prefix . '_' . $js_translation_files[$prefix] . '.js';
 
+    $content = $this->getSession()->getPage()->getcontent();
     // Assert translations JS is included before drupal.js.
-    $this->assertTrue(strpos($this->content, $js_filename) < strpos($this->content, 'core/misc/drupal.js'), 'Translations are included before Drupal.t.');
+    $this->assertTrue(strpos($content, $js_filename) < strpos($content, 'core/misc/drupal.js'), 'Translations are included before Drupal.t.');
   }
 
 }
diff --git a/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php b/core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php
similarity index 85%
rename from core/modules/locale/src/Tests/LocaleLibraryAlterTest.php
rename to core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php
index 68996f44a2..5425fc5f4c 100644
--- a/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\Asset\AttachedAssets;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests localization of the JavaScript libraries.
@@ -12,7 +12,7 @@
  *
  * @group locale
  */
-class LocaleLibraryAlterTest extends WebTestBase {
+class LocaleLibraryAlterTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
diff --git a/core/modules/locale/src/Tests/LocalePluralFormatTest.php b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
similarity index 99%
rename from core/modules/locale/src/Tests/LocalePluralFormatTest.php
rename to core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
index 2315dbd22b..57916caf04 100644
--- a/core/modules/locale/src/Tests/LocalePluralFormatTest.php
+++ b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests plural handling for various languages.
  *
  * @group locale
  */
-class LocalePluralFormatTest extends WebTestBase {
+class LocalePluralFormatTest extends BrowserTestBase {
 
   /**
    * An admin user.
diff --git a/core/modules/locale/src/Tests/LocaleTranslateStringTourTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
similarity index 96%
rename from core/modules/locale/src/Tests/LocaleTranslateStringTourTest.php
rename to core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
index a4b1656655..397c1c763f 100644
--- a/core/modules/locale/src/Tests/LocaleTranslateStringTourTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\tour\Tests\TourTestBase;
 
diff --git a/core/modules/locale/src/Tests/LocaleTranslationUiTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
similarity index 97%
rename from core/modules/locale/src/Tests/LocaleTranslationUiTest.php
rename to core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
index 53f77c19fd..1d39bfc981 100644
--- a/core/modules/locale/src/Tests/LocaleTranslationUiTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Component\Utility\SafeMarkup;
 
@@ -13,7 +13,7 @@
  *
  * @group locale
  */
-class LocaleTranslationUiTest extends WebTestBase {
+class LocaleTranslationUiTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -89,7 +89,7 @@ public function testStringTranslation() {
 
     // Assume this is the only result, given the random name.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $translation,
     ];
@@ -112,7 +112,7 @@ public function testStringTranslation() {
     ];
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $translation_to_en,
     ];
@@ -155,7 +155,7 @@ public function testStringTranslation() {
     ];
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => 'Please enter your Llama username.',
     ];
@@ -189,7 +189,7 @@ public function testStringTranslation() {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     // Assume this is the only result, given the random name.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => '',
     ];
@@ -248,7 +248,7 @@ public function testJavaScriptTranslation() {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
 
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $this->randomMachineName(),
     ];
@@ -309,7 +309,7 @@ public function testStringValidation() {
     // Find the edit path.
 
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     foreach ($bad_translations as $translation) {
       $edit = [
         $lid => $translation,
@@ -399,7 +399,7 @@ public function testStringSearch() {
     // Assume this is the only result, given the random name.
     // We save the lid from the path.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $translation,
     ];
@@ -503,7 +503,7 @@ public function testUICustomizedStrings() {
 
     // Submit the translations without changing the translation.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $translation->getString(),
     ];
@@ -522,7 +522,7 @@ public function testUICustomizedStrings() {
 
     // Submit the translations with a new translation.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = (string) $textarea->getAttribute('name');
     $edit = [
       $lid => $this->randomMachineName(100),
     ];
diff --git a/core/modules/locale/src/Tests/LocaleUpdateBase.php b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
similarity index 98%
rename from core/modules/locale/src/Tests/LocaleUpdateBase.php
rename to core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
index b228a962de..f4c59b2873 100644
--- a/core/modules/locale/src/Tests/LocaleUpdateBase.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\StreamWrapper\PublicStream;
 use Drupal\file\Entity\File;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Component\Utility\SafeMarkup;
 
 /**
  * Base class for testing updates to string translations.
  */
-abstract class LocaleUpdateBase extends WebTestBase {
+abstract class LocaleUpdateBase extends BrowserTestBase {
 
   /**
    * Timestamp for an old translation.
diff --git a/core/modules/locale/src/Tests/LocaleUpdateCronTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
similarity index 97%
rename from core/modules/locale/src/Tests/LocaleUpdateCronTest.php
rename to core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
index 78a14ecac8..d0d5379139 100644
--- a/core/modules/locale/src/Tests/LocaleUpdateCronTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
@@ -1,6 +1,8 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
+
+use Drupal\Tests\Traits\Core\CronRunTrait;
 
 /**
  * Tests for using cron to update project interface translations.
@@ -9,6 +11,8 @@
  */
 class LocaleUpdateCronTest extends LocaleUpdateBase {
 
+  use CronRunTrait;
+
   protected $batchOutput = [];
 
   /**
diff --git a/core/modules/locale/src/Tests/LocaleUpdateDevelopmentReleaseTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
similarity index 88%
rename from core/modules/locale/src/Tests/LocaleUpdateDevelopmentReleaseTest.php
rename to core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
index 3d7970bb98..5c972d1ef3 100644
--- a/core/modules/locale/src/Tests/LocaleUpdateDevelopmentReleaseTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Test for proper version fallback in case of a development release.
  *
  * @group language
  */
-class LocaleUpdateDevelopmentReleaseTest extends WebTestBase {
+class LocaleUpdateDevelopmentReleaseTest extends BrowserTestBase {
 
   public static $modules = ['locale', 'locale_test_development_release'];
 
diff --git a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
similarity index 99%
rename from core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php
rename to core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
index 32928b1d8b..c6c69c2a97 100644
--- a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Component\Render\FormattableMarkup;
 use Drupal\Component\Utility\SafeMarkup;
diff --git a/core/modules/locale/src/Tests/LocaleUpdateTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php
similarity index 99%
rename from core/modules/locale/src/Tests/LocaleUpdateTest.php
rename to core/modules/locale/tests/src/Functional/LocaleUpdateTest.php
index 957419b721..907e572c42 100644
--- a/core/modules/locale/src/Tests/LocaleUpdateTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\Language\LanguageInterface;
 
