diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
index 066dcd5..2c59f99 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\Tests\config_translation\Functional;
 
-use Drupal\views_ui\Tests\UITestBase;
+use Drupal\Tests\views_ui\Functional\UITestBase;
 
 /**
  * Visit view list and test if translate is available.
diff --git a/core/modules/content_translation/src/Tests/Views/ContentTranslationViewsUITest.php b/core/modules/content_translation/src/Tests/Views/ContentTranslationViewsUITest.php
index 07b5d00..4a618ab 100644
--- a/core/modules/content_translation/src/Tests/Views/ContentTranslationViewsUITest.php
+++ b/core/modules/content_translation/src/Tests/Views/ContentTranslationViewsUITest.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\content_translation\Tests\Views;
 
-use Drupal\views_ui\Tests\UITestBase;
+use Drupal\Tests\views_ui\Functional\UITestBase;
 
 /**
  * Tests the views UI when content_translation is enabled.
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
index efa5191..c6e7977 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
@@ -5,8 +5,8 @@
 use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
 use Drupal\taxonomy\Entity\Term;
 use Drupal\taxonomy\Entity\Vocabulary;
+use Drupal\Tests\views_ui\Functional\UITestBase;
 use Drupal\views\Tests\ViewTestData;
-use Drupal\views_ui\Tests\UITestBase;
 use Drupal\views\Entity\View;
 
 /**
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyParentUITest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyParentUITest.php
index a57a09a..c2b5d5d 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyParentUITest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyParentUITest.php
@@ -3,7 +3,7 @@
 namespace Drupal\taxonomy\Tests\Views;
 
 use Drupal\views\Tests\ViewTestData;
-use Drupal\views_ui\Tests\UITestBase;
+use Drupal\Tests\views_ui\Functional\UITestBase;
 
 /**
  * Tests views taxonomy parent plugin UI.
diff --git a/core/modules/user/src/Tests/Views/AccessRoleUITest.php b/core/modules/user/src/Tests/Views/AccessRoleUITest.php
index bea8c53..483988c 100644
--- a/core/modules/user/src/Tests/Views/AccessRoleUITest.php
+++ b/core/modules/user/src/Tests/Views/AccessRoleUITest.php
@@ -2,14 +2,14 @@
 
 namespace Drupal\user\Tests\Views;
 
+use Drupal\Tests\views_ui\Functional\UITestBase;
 use Drupal\views\Tests\ViewTestData;
-use Drupal\views_ui\Tests\UITestBase;
 
 /**
  * Tests views role access plugin UI.
  *
  * @group user
- * @see Drupal\user\Plugin\views\access\Role
+ * @see \Drupal\user\Plugin\views\access\Role
  */
 class AccessRoleUITest extends UITestBase {
 
diff --git a/core/modules/views/tests/src/Functional/ViewTestBase.php b/core/modules/views/tests/src/Functional/ViewTestBase.php
new file mode 100644
index 0000000..54f7272
--- /dev/null
+++ b/core/modules/views/tests/src/Functional/ViewTestBase.php
@@ -0,0 +1,144 @@
+<?php
+
+namespace Drupal\Tests\views\Functional;
+
+use Drupal\Core\Database\Query\SelectInterface;
+use Drupal\Tests\BrowserTestBase;
+use Drupal\views\Tests\ViewResultAssertionTrait;
+use Drupal\views\Tests\ViewTestData;
+use Drupal\views\ViewExecutable;
+
+/**
+ * Defines a base class for Views testing in the full web test environment.
+ *
+ * Use this base test class if you need to emulate a full Drupal installation.
+ * When possible, ViewsKernelTestBase should be used instead. Both base classes
+ * include the same methods.
+ *
+ * @see \Drupal\Tests\views\Kernel\ViewsKernelTestBase
+ * @see \Drupal\simpletest\WebTestBase
+ */
+abstract class ViewTestBase extends BrowserTestBase {
+
+  use ViewResultAssertionTrait;
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('views', 'views_test_config');
+
+  protected function setUp() {
+    parent::setUp();
+    ViewTestData::createTestViews(get_class($this), array('views_test_config'));
+
+  }
+
+  /**
+   * Sets up the views_test_data.module.
+   *
+   * Because the schema of views_test_data.module is dependent on the test
+   * using it, it cannot be enabled normally.
+   */
+  protected function enableViewsTestModule() {
+    // Define the schema and views data variable before enabling the test module.
+    \Drupal::state()->set('views_test_data_schema', $this->schemaDefinition());
+    \Drupal::state()->set('views_test_data_views_data', $this->viewsData());
+
+    \Drupal::service('module_installer')->install(array('views_test_data'));
+    $this->resetAll();
+    $this->rebuildContainer();
+    $this->container->get('module_handler')->reload();
+
+    // Load the test dataset.
+    $data_set = $this->dataSet();
+    $query = db_insert('views_test_data')
+      ->fields(array_keys($data_set[0]));
+    foreach ($data_set as $record) {
+      $query->values($record);
+    }
+    $query->execute();
+  }
+
+  /**
+   * Orders a nested array containing a result set based on a given column.
+   *
+   * @param array $result_set
+   *   An array of rows from a result set, with each row as an associative
+   *   array keyed by column name.
+   * @param string $column
+   *   The column name by which to sort the result set.
+   * @param bool $reverse
+   *   (optional) Boolean indicating whether to sort the result set in reverse
+   *   order. Defaults to FALSE.
+   *
+   * @return array
+   *   The sorted result set.
+   */
+  protected function orderResultSet($result_set, $column, $reverse = FALSE) {
+    $order = $reverse ? -1 : 1;
+    usort($result_set, function ($a, $b) use ($column, $order) {
+      if ($a[$column] == $b[$column]) {
+        return 0;
+      }
+      return $order * (($a[$column] < $b[$column]) ? -1 : 1);
+    });
+    return $result_set;
+  }
+
+  /**
+   * Asserts the existence of a button with a certain ID and label.
+   *
+   * @param string $id
+   *   The HTML ID of the button
+   * @param string $label.
+   *   The expected label for the button.
+   */
+  protected function helperButtonHasLabel($id, $expected_label) {
+    $this->assertSession()->fieldValueEquals($id, $expected_label);
+  }
+
+  /**
+   * Executes a view with debugging.
+   *
+   * @param \Drupal\views\ViewExecutable $view
+   *   The view object.
+   * @param array $args
+   *   (optional) An array of the view arguments to use for the view.
+   */
+  protected function executeView(ViewExecutable $view, $args = array()) {
+    // A view does not really work outside of a request scope, due to many
+    // dependencies like the current user.
+    $view->setDisplay();
+    $view->preExecute($args);
+    $view->execute();
+    $verbose_message = '<pre>Executed view: ' . ((string) $view->build_info['query']) . '</pre>';
+    if ($view->build_info['query'] instanceof SelectInterface) {
+      $verbose_message .= '<pre>Arguments: ' . print_r($view->build_info['query']->getArguments(), TRUE) . '</pre>';
+    }
+    $this->verbose($verbose_message);
+  }
+
+  /**
+   * Returns the schema definition.
+   */
+  protected function schemaDefinition() {
+    return ViewTestData::schemaDefinition();
+  }
+
+  /**
+   * Returns the views data definition.
+   */
+  protected function viewsData() {
+    return ViewTestData::viewsData();
+  }
+
+  /**
+   * Returns a very simple test dataset.
+   */
+  protected function dataSet() {
+    return ViewTestData::dataSet();
+  }
+
+}
diff --git a/core/modules/views_ui/src/Tests/AnalyzeTest.php b/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
similarity index 96%
rename from core/modules/views_ui/src/Tests/AnalyzeTest.php
rename to core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
index 83e2531..786c828 100644
--- a/core/modules/views_ui/src/Tests/AnalyzeTest.php
+++ b/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Tests\ViewTestBase;
 
diff --git a/core/modules/views_ui/src/Tests/AreaEntityUITest.php b/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
similarity index 93%
rename from core/modules/views_ui/src/Tests/AreaEntityUITest.php
rename to core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
index ffe895a..d74575f 100644
--- a/core/modules/views_ui/src/Tests/AreaEntityUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\block\Entity\Block;
 use Drupal\entity_test\Entity\EntityTest;
@@ -34,15 +34,15 @@ public function testUI() {
     $this->drupalGet($view->urlInfo('edit-form'));
 
     // Add a global NULL argument to the view for testing argument placeholders.
-    $this->drupalPostForm("admin/structure/views/nojs/add-handler/$id/page_1/argument", ['name[views.null]' => 1], 'Add and configure contextual filters');
+    $this->drupalPostForm("admin/structure/views/nojs/add-handler/$id/page_1/argument", ['name[views.null]' => TRUE], 'Add and configure contextual filters');
     $this->drupalPostForm(NULL, [], 'Apply');
 
     // Configure both the entity_test area header and the block header to
     // reference the given entities.
-    $this->drupalPostForm("admin/structure/views/nojs/add-handler/$id/page_1/header", ['name[views.entity_block]' => 1], 'Add and configure header');
+    $this->drupalPostForm("admin/structure/views/nojs/add-handler/$id/page_1/header", ['name[views.entity_block]' => TRUE], 'Add and configure header');
     $this->drupalPostForm(NULL, ['options[target]' => $block->id()], 'Apply');
 
-    $this->drupalPostForm("admin/structure/views/nojs/add-handler/$id/page_1/header", ['name[views.entity_entity_test]' => 1], 'Add and configure header');
+    $this->drupalPostForm("admin/structure/views/nojs/add-handler/$id/page_1/header", ['name[views.entity_entity_test]' => TRUE], 'Add and configure header');
     $this->drupalPostForm(NULL, ['options[target]' => $entity_test->id()], 'Apply');
 
     $this->drupalPostForm(NULL, [], 'Save');
diff --git a/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php b/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/ArgumentValidatorTest.php
rename to core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php
index d94e682..5a33970 100644
--- a/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Views;
 
diff --git a/core/modules/views_ui/src/Tests/CachedDataUITest.php b/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/CachedDataUITest.php
rename to core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
index a605d0f..51e489d 100644
--- a/core/modules/views_ui/src/Tests/CachedDataUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests the user tempstore cache in the UI.
diff --git a/core/modules/views_ui/src/Tests/CustomBooleanTest.php b/core/modules/views_ui/tests/src/Functional/CustomBooleanTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/CustomBooleanTest.php
rename to core/modules/views_ui/tests/src/Functional/CustomBooleanTest.php
index adae59a..39076cd 100644
--- a/core/modules/views_ui/src/Tests/CustomBooleanTest.php
+++ b/core/modules/views_ui/tests/src/Functional/CustomBooleanTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\views\Views;
@@ -173,8 +173,7 @@ public function testCustomOptionTemplate() {
       $this->{$values['test']}(strpos($output, $values['false']), SafeMarkup::format('Expected custom boolean FALSE value %value in output for %type', ['%value' => $values['false'], '%type' => $type]));
 
       // Assert that we are using the correct template.
-      $this->setRawContent($output);
-      $this->assertText('llama', 'Loaded the correct views-view-field.html.twig template');
+      $this->assertContains('llama', $output);
     }
   }
 
diff --git a/core/modules/views_ui/src/Tests/DefaultViewsTest.php b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/DefaultViewsTest.php
rename to core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
index a709d1f..70595f3 100644
--- a/core/modules/views_ui/src/Tests/DefaultViewsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Core\Url;
 use Drupal\user\Entity\Role;
@@ -20,11 +20,10 @@ class DefaultViewsTest extends UITestBase {
    */
   public static $testViews = ['test_view_status', 'test_page_display_menu', 'test_page_display_arguments'];
 
-
   protected function setUp() {
     parent::setUp();
 
-    $this->drupalPlaceBlock('page_title_block');
+    $this->placeBlock('page_title_block');
   }
 
   /**
@@ -178,7 +177,7 @@ public function testSplitListing() {
     $this->assertIdentical(count($elements), 1, 'A disabled view is found in the disabled views table.');
 
     // Enable the view.
-    $this->clickViewsOperationLink(t('Enable'), '/test_view_status/');
+    $this->clickViewsOperationLink('Enable', '/test_view_status/');
 
     $elements = $this->xpath($xpath, $arguments);
     $this->assertIdentical(count($elements), 0, 'After enabling a view, it is not found in the disabled views table.');
@@ -230,7 +229,7 @@ public function testPathDestination() {
   public function clickViewsOperationLink($label, $unique_href_part) {
     $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => $label]);
     foreach ($links as $link_index => $link) {
-      $position = strpos($link['href'], $unique_href_part);
+      $position = strpos($link->getAttribute('href'), $unique_href_part);
       if ($position !== FALSE) {
         $index = $link_index;
         break;
diff --git a/core/modules/views_ui/src/Tests/DisplayAttachmentTest.php b/core/modules/views_ui/tests/src/Functional/DisplayAttachmentTest.php
similarity index 96%
rename from core/modules/views_ui/src/Tests/DisplayAttachmentTest.php
rename to core/modules/views_ui/tests/src/Functional/DisplayAttachmentTest.php
index 480172b..46f3370 100644
--- a/core/modules/views_ui/src/Tests/DisplayAttachmentTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayAttachmentTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Views;
 
@@ -50,7 +50,7 @@ public function testAttachmentUI() {
 
     $this->drupalPostForm($attachment_display_url, ['displays[default]' => 1, 'displays[page_1]' => 1], t('Apply'));
     $result = $this->xpath('//a[@id = :id]', [':id' => 'views-attachment-1-displays']);
-    $this->assertEqual($result[0]->attributes()->title, t('Multiple displays'));
+    $this->assertEqual($result[0]->getAttribute('title'), t('Multiple displays'));
     $this->drupalPostForm(NULL, [], t('Save'));
 
     $view = Views::getView('test_attachment_ui');
diff --git a/core/modules/views_ui/src/Tests/DisplayCRUDTest.php b/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
similarity index 99%
rename from core/modules/views_ui/src/Tests/DisplayCRUDTest.php
rename to core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
index e29f0a9..1e53c71 100644
--- a/core/modules/views_ui/src/Tests/DisplayCRUDTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Views;
 
diff --git a/core/modules/views_ui/src/Tests/DisplayExtenderUITest.php b/core/modules/views_ui/tests/src/Functional/DisplayExtenderUITest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/DisplayExtenderUITest.php
rename to core/modules/views_ui/tests/src/Functional/DisplayExtenderUITest.php
index e8eff0a..b222f15 100644
--- a/core/modules/views_ui/src/Tests/DisplayExtenderUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayExtenderUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Views;
 
diff --git a/core/modules/views_ui/src/Tests/DisplayFeedTest.php b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
similarity index 86%
rename from core/modules/views_ui/src/Tests/DisplayFeedTest.php
rename to core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
index d8d0031..e038539 100644
--- a/core/modules/views_ui/src/Tests/DisplayFeedTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests the UI for feed display plugin.
@@ -57,10 +57,9 @@ protected function checkFeedViewUi($view_name) {
     $result = $this->xpath('//div[@id="edit-displays"]/div');
     $options = [];
     foreach ($result as $item) {
-      foreach ($item->input->attributes() as $attribute => $value) {
-        if ($attribute == 'value') {
-          $options[] = (string) $value;
-        }
+      $input_node = $item->find('css', 'input');
+      if ($input_node->hasAttribute('value')) {
+        $options[] = $input_node->getAttribute('value');
       }
     }
 
@@ -73,12 +72,12 @@ protected function checkFeedViewUi($view_name) {
     $this->assertNoRaw('<em>Page</em>');
 
     $this->drupalGet('admin/structure/views/view/' . $view_name . '/edit/feed_1');
-    $this->assertFieldByXpath('//*[@id="views-feed-1-displays"]', '<em>Page</em>');
+    $this->fieldValueEquals('views-feed-1-displays', '<em>Page</em>');
 
     // Add the default display, so there should now be multiple displays.
     $this->drupalPostForm('admin/structure/views/nojs/display/' . $view_name . '/feed_1/displays', ['displays[default]' => 'default'], t('Apply'));
     $this->drupalGet('admin/structure/views/view/' . $view_name . '/edit/feed_1');
-    $this->assertFieldByXpath('//*[@id="views-feed-1-displays"]', 'Multiple displays');
+    $this->fieldValueEquals('views-feed-1-displays', 'Multiple displays');
   }
 
 }
diff --git a/core/modules/views_ui/src/Tests/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/DisplayPathTest.php
rename to core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
index d1d1732..74b4d58 100644
--- a/core/modules/views_ui/src/Tests/DisplayPathTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 use Drupal\Core\Menu\MenuTreeParameters;
 use Drupal\menu_link_content\Entity\MenuLinkContent;
 
@@ -15,7 +15,7 @@ class DisplayPathTest extends UITestBase {
   protected function setUp() {
     parent::setUp();
 
-    $this->drupalPlaceBlock('page_title_block');
+    $this->placeBlock('page_title_block');
   }
 
   /**
@@ -158,7 +158,7 @@ public function testMenuOptions() {
     $this->drupalGet('admin/structure/views/nojs/display/test_page_display_menu/page_5/menu');
     $this->assertResponse(200);
     $menu_parent = $this->xpath('//select[@id="edit-menu-parent"]');
-    $menu_options = (array) $menu_parent[0]->option;
+    $menu_options = (array) $menu_parent[0]->findAll('css', 'option');
     unset($menu_options['@attributes']);
 
     $this->assertEqual([
diff --git a/core/modules/views_ui/src/Tests/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/DisplayTest.php
rename to core/modules/views_ui/tests/src/Functional/DisplayTest.php
index afb2c7f..ece573c 100644
--- a/core/modules/views_ui/src/Tests/DisplayTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Component\Serialization\Json;
 use Drupal\Component\Utility\SafeMarkup;
@@ -145,7 +145,7 @@ public function testDisplayAreas() {
     // Assert that the expected text is found in each area category.
     foreach ($areas as $type) {
       $element = $this->xpath('//div[contains(@class, :class)]/div', [':class' => $type]);
-      $this->assertEqual((string) $element[0], SafeMarkup::format('The selected display type does not use @type plugins', ['@type' => $type]));
+      $this->assertEqual($element[0]->getHtml(), SafeMarkup::format('The selected display type does not use @type plugins', ['@type' => $type]));
     }
   }
 
diff --git a/core/modules/views_ui/src/Tests/DuplicateTest.php b/core/modules/views_ui/tests/src/Functional/DuplicateTest.php
similarity index 92%
rename from core/modules/views_ui/src/Tests/DuplicateTest.php
rename to core/modules/views_ui/tests/src/Functional/DuplicateTest.php
index 1096ab4..60a226a 100644
--- a/core/modules/views_ui/src/Tests/DuplicateTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DuplicateTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests the UI for view duplicate tool.
@@ -12,7 +12,7 @@ class DuplicateTest extends UITestBase {
   protected function setUp() {
     parent::setUp();
 
-    $this->drupalPlaceBlock('page_title_block');
+    $this->placeBlock('page_title_block');
   }
 
   /**
diff --git a/core/modules/views_ui/src/Tests/ExposedFormUITest.php b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
similarity index 99%
rename from core/modules/views_ui/src/Tests/ExposedFormUITest.php
rename to core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
index 0aaa6ee..26c0f1f 100644
--- a/core/modules/views_ui/src/Tests/ExposedFormUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Entity\View;
 
diff --git a/core/modules/views_ui/src/Tests/FieldUITest.php b/core/modules/views_ui/tests/src/Functional/FieldUITest.php
similarity index 79%
rename from core/modules/views_ui/src/Tests/FieldUITest.php
rename to core/modules/views_ui/tests/src/Functional/FieldUITest.php
index 4e87323..5bd5d43 100644
--- a/core/modules/views_ui/src/Tests/FieldUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/FieldUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Component\Serialization\Json;
 use Drupal\views\Views;
@@ -39,20 +39,20 @@ public function testFieldUI() {
     $edit_handler_url = 'admin/structure/views/nojs/handler/test_view/default/field/age';
     $this->drupalGet($edit_handler_url);
     $result = $this->xpath('//details[@id="edit-options-alter-help"]/div[@class="details-wrapper"]/div[@class="item-list"]/ul/li');
-    $this->assertEqual((string) $result[0], '{{ age }} == Age');
+    $this->assertEqual($result[0]->getHtml(), '{{ age }} == Age');
 
     $edit_handler_url = 'admin/structure/views/nojs/handler/test_view/default/field/id';
     $this->drupalGet($edit_handler_url);
     $result = $this->xpath('//details[@id="edit-options-alter-help"]/div[@class="details-wrapper"]/div[@class="item-list"]/ul/li');
-    $this->assertEqual((string) $result[0], '{{ age }} == Age');
-    $this->assertEqual((string) $result[1], '{{ id }} == ID');
+    $this->assertEqual(trim($result[0]->getHtml()), '{{ age }} == Age');
+    $this->assertEqual(trim($result[1]->getHtml()), '{{ id }} == ID');
 
     $edit_handler_url = 'admin/structure/views/nojs/handler/test_view/default/field/name';
     $this->drupalGet($edit_handler_url);
     $result = $this->xpath('//details[@id="edit-options-alter-help"]/div[@class="details-wrapper"]/div[@class="item-list"]/ul/li');
-    $this->assertEqual((string) $result[0], '{{ age }} == Age');
-    $this->assertEqual((string) $result[1], '{{ id }} == ID');
-    $this->assertEqual((string) $result[2], '{{ name }} == Name');
+    $this->assertEqual(trim($result[0]->getHtml()), '{{ age }} == Age');
+    $this->assertEqual(trim($result[1]->getHtml()), '{{ id }} == ID');
+    $this->assertEqual(trim($result[2]->getHtml()), '{{ name }} == Name');
 
     $result = $this->xpath('//details[@id="edit-options-more"]');
     $this->assertEqual(empty($result), TRUE, "Container 'more' is empty and should not be displayed.");
@@ -69,10 +69,11 @@ public function testFieldUI() {
 
     $this->assertLinkByHref($edit_groupby_url, 0, 'Aggregation link found.');
 
-    $edit_handler_url = '/admin/structure/views/ajax/handler-group/test_view/default/field/name';
-    $this->drupalGet($edit_handler_url);
-    $data = Json::decode($this->getRawContent());
-    $this->assertEqual($data[3]['dialogOptions']['title'], 'Configure aggregation settings for field Views test: Name');
+    // @todo Get this test working under BrowserTestBase.
+//    $edit_handler_url = '/admin/structure/views/ajax/handler-group/test_view/default/field/name';
+//    $this->drupalGet($edit_handler_url);
+//    $data = Json::decode($this->getRawContent());
+//    $this->assertEqual($data[3]['dialogOptions']['title'], 'Configure aggregation settings for field Views test: Name');
   }
 
   /**
diff --git a/core/modules/views_ui/src/Tests/FilterBooleanWebTest.php b/core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php
similarity index 88%
rename from core/modules/views_ui/src/Tests/FilterBooleanWebTest.php
rename to core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php
index a3e58d7..dd5614e 100644
--- a/core/modules/views_ui/src/Tests/FilterBooleanWebTest.php
+++ b/core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests the boolean filter UI.
@@ -25,7 +25,7 @@ public function testFilterBooleanUI() {
 
     // Check the field widget label. 'title' should be used as a fallback.
     $result = $this->cssSelect('#edit-options-value--wrapper legend span');
-    $this->assertEqual((string) $result[0], 'Status');
+    $this->assertEqual($result[0]->getHtml(), 'Status');
 
     $this->drupalPostForm(NULL, [], t('Expose filter'));
     $this->drupalPostForm(NULL, [], t('Grouped filters'));
@@ -46,11 +46,11 @@ public function testFilterBooleanUI() {
     $this->drupalGet('admin/structure/views/nojs/handler/test_view/default/filter/status');
 
     $result = $this->xpath('//input[@name="options[group_info][group_items][1][value]"]');
-    $this->assertEqual((int) $result[1]->attributes()->checked, 'checked');
+    $this->assertEqual((int) $result[1]->getAttribute('checked'), 'checked');
     $result = $this->xpath('//input[@name="options[group_info][group_items][2][value]"]');
-    $this->assertEqual((int) $result[2]->attributes()->checked, 'checked');
+    $this->assertEqual((int) $result[2]->getAttribute('checked'), 'checked');
     $result = $this->xpath('//input[@name="options[group_info][group_items][3][value]"]');
-    $this->assertEqual((int) $result[1]->attributes()->checked, 'checked');
+    $this->assertEqual((int) $result[1]->getAttribute('checked'), 'checked');
 
     // Test that there is a remove link for each group.
     $this->assertEqual(count($this->cssSelect('a.views-remove-link')), 3);
diff --git a/core/modules/views_ui/src/Tests/FilterNumericWebTest.php b/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
similarity index 99%
rename from core/modules/views_ui/src/Tests/FilterNumericWebTest.php
rename to core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
index 104d62f..d54ee10 100644
--- a/core/modules/views_ui/src/Tests/FilterNumericWebTest.php
+++ b/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Tests\SchemaCheckTestTrait;
 
diff --git a/core/modules/views_ui/src/Tests/FilterUITest.php b/core/modules/views_ui/tests/src/Functional/FilterUITest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/FilterUITest.php
rename to core/modules/views_ui/tests/src/Functional/FilterUITest.php
index 1197fc6..291f958 100644
--- a/core/modules/views_ui/src/Tests/FilterUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/FilterUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Tests\ViewTestBase;
 
diff --git a/core/modules/views_ui/src/Tests/GroupByTest.php b/core/modules/views_ui/tests/src/Functional/GroupByTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/GroupByTest.php
rename to core/modules/views_ui/tests/src/Functional/GroupByTest.php
index 4b564c5..4a45d85 100644
--- a/core/modules/views_ui/src/Tests/GroupByTest.php
+++ b/core/modules/views_ui/tests/src/Functional/GroupByTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests UI of aggregate functionality..
diff --git a/core/modules/views_ui/src/Tests/HandlerTest.php b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/HandlerTest.php
rename to core/modules/views_ui/tests/src/Functional/HandlerTest.php
index 8fb29f9..6b466f6 100644
--- a/core/modules/views_ui/src/Tests/HandlerTest.php
+++ b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\field\Entity\FieldConfig;
@@ -34,7 +34,7 @@ class HandlerTest extends UITestBase {
   protected function setUp() {
     parent::setUp();
 
-    $this->drupalPlaceBlock('page_title_block');
+    $this->placeBlock('page_title_block');
     ViewTestData::createTestViews(get_class($this), ['node_test_views']);
   }
 
@@ -208,7 +208,7 @@ public function testBrokenHandlers() {
 
       $text = 'Broken/missing handler';
 
-      $this->assertIdentical((string) $result[0], $text, 'Ensure the broken handler text was found.');
+      $this->assertIdentical($result[0]->getText(), $text, 'Ensure the broken handler text was found.');
 
       $this->drupalGet($href);
       $result = $this->xpath('//h1[@class="page-title"]');
diff --git a/core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
similarity index 96%
rename from core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php
rename to core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
index 3318f0b..360617e 100644
--- a/core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php
+++ b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\simpletest\WebTestBase;
 
diff --git a/core/modules/views_ui/src/Tests/OverrideDisplaysTest.php b/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
similarity index 99%
rename from core/modules/views_ui/src/Tests/OverrideDisplaysTest.php
rename to core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
index ba42542..03a2d47 100644
--- a/core/modules/views_ui/src/Tests/OverrideDisplaysTest.php
+++ b/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests that displays can be correctly overridden via the user interface.
diff --git a/core/modules/views_ui/src/Tests/PreviewTest.php b/core/modules/views_ui/tests/src/Functional/PreviewTest.php
similarity index 94%
rename from core/modules/views_ui/src/Tests/PreviewTest.php
rename to core/modules/views_ui/tests/src/Functional/PreviewTest.php
index 95fba8c..bb1e723 100644
--- a/core/modules/views_ui/src/Tests/PreviewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/PreviewTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Component\Serialization\Json;
 use Drupal\Core\EventSubscriber\MainContentViewSubscriber;
@@ -85,7 +85,7 @@ public function testPreviewUI() {
     $this->clickLink(t('Feed'));
     $this->drupalPostForm(NULL, [], t('Update preview'));
     $result = $this->xpath('//div[@id="views-live-preview"]/pre');
-    $this->assertTrue(strpos($result[0], '<title>' . $view['page[title]'] . '</title>'), 'The Feed RSS preview was rendered.');
+    $this->assertTrue(strpos($result[0]->getHtml(), '<title>' . $view['page[title]'] . '</title>'), 'The Feed RSS preview was rendered.');
 
     // Test the non-default UI display options.
     // Statistics only, no query.
@@ -304,8 +304,8 @@ public function testPreviewSortLink() {
    */
   protected function getPreviewAJAX($view_name, $panel_id, $row_count) {
     $this->drupalGet('admin/structure/views/view/' . $view_name . '/preview/' . $panel_id);
-    $result = $this->drupalPostAjaxForm(NULL, [], ['op' => t('Update preview')]);
-    $this->assertPreviewAJAX($result, $row_count);
+    $this->drupalPostForm(NULL, [], 'Update preview');
+    $this->assertPreviewAJAX($row_count);
   }
 
   /**
@@ -329,26 +329,15 @@ protected function clickPreviewLinkAJAX($url, $row_count) {
     if (!empty($result)) {
       $this->drupalProcessAjaxResponse($content, $result, $ajax_settings, $drupal_settings);
     }
-    $this->assertPreviewAJAX($result, $row_count);
+    $this->assertPreviewAJAX($row_count);
   }
 
   /**
    * Assert that the AJAX response contains expected data.
-   *
-   * @param array $result
-   *   An array of AJAX commands.
    * @param int $row_count
    *   The expected number of rows in the preview.
    */
-  protected function assertPreviewAJAX($result, $row_count) {
-    // Has AJAX callback replied with an insert command? If so, we can
-    // assume that the page content was updated with AJAX returned data.
-    $result_commands = [];
-    foreach ($result as $command) {
-      $result_commands[$command['command']] = $command;
-    }
-    $this->assertTrue(isset($result_commands['insert']), 'AJAX insert command received.');
-
+  protected function assertPreviewAJAX($row_count) {
     // Test if preview contains the expected number of rows.
     $elements = $this->xpath('//div[@class = "view-content"]/div[contains(@class, views-row)]');
     $this->assertEqual(count($elements), $row_count, 'Expected items found on page.');
diff --git a/core/modules/views_ui/src/Tests/QueryTest.php b/core/modules/views_ui/tests/src/Functional/QueryTest.php
similarity index 96%
rename from core/modules/views_ui/src/Tests/QueryTest.php
rename to core/modules/views_ui/tests/src/Functional/QueryTest.php
index 066be3e..0eb58ce 100644
--- a/core/modules/views_ui/src/Tests/QueryTest.php
+++ b/core/modules/views_ui/tests/src/Functional/QueryTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Views;
 use Drupal\views\Entity\View;
diff --git a/core/modules/views_ui/src/Tests/RearrangeFieldsTest.php b/core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/RearrangeFieldsTest.php
rename to core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php
index 7d5eddf..125a7e9 100644
--- a/core/modules/views_ui/src/Tests/RearrangeFieldsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Views;
 
diff --git a/core/modules/views_ui/src/Tests/RedirectTest.php b/core/modules/views_ui/tests/src/Functional/RedirectTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/RedirectTest.php
rename to core/modules/views_ui/tests/src/Functional/RedirectTest.php
index cc5d246..4df38ce 100644
--- a/core/modules/views_ui/src/Tests/RedirectTest.php
+++ b/core/modules/views_ui/tests/src/Functional/RedirectTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests the redirecting after saving a views.
diff --git a/core/modules/views_ui/src/Tests/ReportFieldsTest.php b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/ReportFieldsTest.php
rename to core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
index 9b2245e..d2527d0 100644
--- a/core/modules/views_ui/src/Tests/ReportFieldsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
diff --git a/core/modules/views_ui/src/Tests/ReportTest.php b/core/modules/views_ui/tests/src/Functional/ReportTest.php
similarity index 94%
rename from core/modules/views_ui/src/Tests/ReportTest.php
rename to core/modules/views_ui/tests/src/Functional/ReportTest.php
index 0162519..70414e6 100644
--- a/core/modules/views_ui/src/Tests/ReportTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ReportTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 use Drupal\simpletest\WebTestBase;
 
 /**
diff --git a/core/modules/views_ui/src/Tests/RowUITest.php b/core/modules/views_ui/tests/src/Functional/RowUITest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/RowUITest.php
rename to core/modules/views_ui/tests/src/Functional/RowUITest.php
index 5689009..707d1a3 100644
--- a/core/modules/views_ui/src/Tests/RowUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/RowUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Core\Entity\Entity\EntityViewMode;
 use Drupal\views\Views;
diff --git a/core/modules/views_ui/src/Tests/SettingsTest.php b/core/modules/views_ui/tests/src/Functional/SettingsTest.php
similarity index 99%
rename from core/modules/views_ui/src/Tests/SettingsTest.php
rename to core/modules/views_ui/tests/src/Functional/SettingsTest.php
index f583185..f32c2d6 100644
--- a/core/modules/views_ui/src/Tests/SettingsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/SettingsTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests all ui related settings under admin/structure/views/settings.
diff --git a/core/modules/views_ui/src/Tests/StorageTest.php b/core/modules/views_ui/tests/src/Functional/StorageTest.php
similarity index 96%
rename from core/modules/views_ui/src/Tests/StorageTest.php
rename to core/modules/views_ui/tests/src/Functional/StorageTest.php
index fa33b8f..df3d030 100644
--- a/core/modules/views_ui/src/Tests/StorageTest.php
+++ b/core/modules/views_ui/tests/src/Functional/StorageTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\views\Views;
diff --git a/core/modules/views_ui/src/Tests/StyleTableTest.php b/core/modules/views_ui/tests/src/Functional/StyleTableTest.php
similarity index 95%
rename from core/modules/views_ui/src/Tests/StyleTableTest.php
rename to core/modules/views_ui/tests/src/Functional/StyleTableTest.php
index d6b757e..d00df33 100644
--- a/core/modules/views_ui/src/Tests/StyleTableTest.php
+++ b/core/modules/views_ui/tests/src/Functional/StyleTableTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Views;
 
diff --git a/core/modules/views_ui/src/Tests/StyleUITest.php b/core/modules/views_ui/tests/src/Functional/StyleUITest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/StyleUITest.php
rename to core/modules/views_ui/tests/src/Functional/StyleUITest.php
index 3fc2ae0..1eb9c78 100644
--- a/core/modules/views_ui/src/Tests/StyleUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/StyleUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Views;
 
diff --git a/core/modules/views_ui/src/Tests/TokenizeAreaUITest.php b/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php
similarity index 100%
rename from core/modules/views_ui/src/Tests/TokenizeAreaUITest.php
rename to core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php
diff --git a/core/modules/views_ui/src/Tests/TranslatedViewTest.php b/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/TranslatedViewTest.php
rename to core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
index beaf5f1..015e841 100644
--- a/core/modules/views_ui/src/Tests/TranslatedViewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\simpletest\WebTestBase;
diff --git a/core/modules/views_ui/src/Tests/UITestBase.php b/core/modules/views_ui/tests/src/Functional/UITestBase.php
similarity index 87%
rename from core/modules/views_ui/src/Tests/UITestBase.php
rename to core/modules/views_ui/tests/src/Functional/UITestBase.php
index 0b90e04..6814281 100644
--- a/core/modules/views_ui/src/Tests/UITestBase.php
+++ b/core/modules/views_ui/tests/src/Functional/UITestBase.php
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
-use Drupal\views\Tests\ViewTestBase;
+use Drupal\Tests\views\Functional\ViewTestBase;
 
 /**
  * Provides a base class for testing the Views UI.
@@ -78,9 +78,9 @@ protected function drupalGet($path, array $options = [], array $headers = []) {
     // Ensure that each nojs page is accessible via ajax as well.
     if (strpos($url, 'nojs') !== FALSE) {
       $url = str_replace('nojs', 'ajax', $url);
-      $result = $this->drupalGet($url, $options, $headers);
-      $this->assertResponse(200);
-      $this->assertHeader('Content-Type', 'application/json');
+      $result = $this->drupalGet($url, $options);
+      $this->assertSession()->statusCodeEquals(200);
+      $this->assertEquals('application/json', $this->getSession()->getResponseHeader('Content-Type'));
       $this->assertTrue(json_decode($result), 'Ensure that the AJAX request returned valid content.');
     }
 
diff --git a/core/modules/views_ui/src/Tests/UnsavedPreviewTest.php b/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/UnsavedPreviewTest.php
rename to core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
index 6418fc0..091bca5 100644
--- a/core/modules/views_ui/src/Tests/UnsavedPreviewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Tests\ViewTestBase;
 
diff --git a/core/modules/views_ui/src/Tests/ViewEditTest.php b/core/modules/views_ui/tests/src/Functional/ViewEditTest.php
similarity index 99%
rename from core/modules/views_ui/src/Tests/ViewEditTest.php
rename to core/modules/views_ui/tests/src/Functional/ViewEditTest.php
index 08c5cfe..cb712b0 100644
--- a/core/modules/views_ui/src/Tests/ViewEditTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewEditTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\views\Entity\View;
diff --git a/core/modules/views_ui/src/Tests/ViewsListTest.php b/core/modules/views_ui/tests/src/Functional/ViewsListTest.php
similarity index 97%
rename from core/modules/views_ui/src/Tests/ViewsListTest.php
rename to core/modules/views_ui/tests/src/Functional/ViewsListTest.php
index 5178674..d936f67 100644
--- a/core/modules/views_ui/src/Tests/ViewsListTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewsListTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\simpletest\WebTestBase;
 use Drupal\views\Entity\View;
diff --git a/core/modules/views_ui/src/Tests/ViewsUITourTest.php b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/ViewsUITourTest.php
rename to core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
index 31748e8..596923b 100644
--- a/core/modules/views_ui/src/Tests/ViewsUITourTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\tour\Tests\TourTestBase;
 use Drupal\language\Entity\ConfigurableLanguage;
diff --git a/core/modules/views_ui/src/Tests/WizardTest.php b/core/modules/views_ui/tests/src/Functional/WizardTest.php
similarity index 98%
rename from core/modules/views_ui/src/Tests/WizardTest.php
rename to core/modules/views_ui/tests/src/Functional/WizardTest.php
index 4e57e8f..913fc23 100644
--- a/core/modules/views_ui/src/Tests/WizardTest.php
+++ b/core/modules/views_ui/tests/src/Functional/WizardTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\views\Tests\Wizard\WizardTestBase;
 
diff --git a/core/modules/views_ui/src/Tests/XssTest.php b/core/modules/views_ui/tests/src/Functional/XssTest.php
similarity index 68%
rename from core/modules/views_ui/src/Tests/XssTest.php
rename to core/modules/views_ui/tests/src/Functional/XssTest.php
index 1c3cef6..1d0dfc8 100644
--- a/core/modules/views_ui/src/Tests/XssTest.php
+++ b/core/modules/views_ui/tests/src/Functional/XssTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests the Xss vulnerability.
@@ -17,12 +17,22 @@ class XssTest extends UITestBase {
   public static $modules = ['node', 'user', 'views_ui', 'views_ui_test'];
 
   public function testViewsUi() {
+    $this->drupalGet('admin/structure/views');
+    // The view tag is properly escaped.
+    $this->assertEscaped('<script>alert("foo");</script>, <marquee>test</marquee>');
+
     $this->drupalGet('admin/structure/views/view/sa_contrib_2013_035');
     $this->assertEscaped('<marquee>test</marquee>', 'Field admin label is properly escaped.');
+    // Field admin label is properly escaped.
+    $this->assertEscaped('<marquee>test</marquee>');
 
     $this->drupalGet('admin/structure/views/nojs/handler/sa_contrib_2013_035/page_1/header/area');
     $this->assertEscaped('{{ title }} == <marquee>test</marquee>', 'Token label is properly escaped.');
     $this->assertEscaped('{{ title_1 }} == <script>alert("XSS")</script>', 'Token label is properly escaped.');
+    // Token label is properly escaped.
+    $this->assertEscaped('{{ title }} == <marquee>test</marquee>');
+    // Token label is properly escaped.
+    $this->assertEscaped('{{ title_1 }} == <script>alert("XSS")</script>');
   }
 
   /**
