diff --git a/core/modules/views/src/Element/View.php b/core/modules/views/src/Element/View.php index e12037e..f56353b 100644 --- a/core/modules/views/src/Element/View.php +++ b/core/modules/views/src/Element/View.php @@ -95,10 +95,6 @@ public static function preRenderViewElement($element) { views_add_contextual_links($element, 'view', $view->current_display); } } - if (empty($view->display_handler->getPluginDefinition()['returns_response'])) { - $element['#attributes']['class'][] = 'views-element-container'; - $element['#theme_wrappers'] = array('container'); - } } return $element; diff --git a/core/modules/views/src/Tests/ViewElementTest.php b/core/modules/views/src/Tests/ViewElementTest.php index e55a21c..8a65baa 100644 --- a/core/modules/views/src/Tests/ViewElementTest.php +++ b/core/modules/views/src/Tests/ViewElementTest.php @@ -61,9 +61,6 @@ public function testViewElement() { $render = $this->render; $this->setRawContent($renderer->renderRoot($render)); - $xpath = $this->xpath('//div[@class="views-element-container"]'); - $this->assertTrue($xpath, 'The view container has been found in the rendered output.'); - $xpath = $this->xpath('//div[@class="view-content"]'); $this->assertTrue($xpath, 'The view content has been found in the rendered output.'); // There should be 5 rows in the results. @@ -73,9 +70,6 @@ public function testViewElement() { // Test a form. $this->drupalGet('views_test_data_element_form'); - $xpath = $this->xpath('//div[@class="views-element-container js-form-wrapper form-wrapper"]'); - $this->assertTrue($xpath, 'The view container has been found on the form.'); - $xpath = $this->xpath('//div[@class="view-content"]'); $this->assertTrue($xpath, 'The view content has been found on the form.'); // There should be 5 rows in the results. @@ -130,9 +124,6 @@ public function testViewElementEmbed() { $render['view']['#embed'] = TRUE; $this->setRawContent($renderer->renderRoot($render)); - $xpath = $this->xpath('//div[@class="views-element-container"]'); - $this->assertTrue($xpath, 'The view container has been found in the rendered output.'); - $xpath = $this->xpath('//div[@class="view-content"]'); $this->assertTrue($xpath, 'The view content has been found in the rendered output.'); // There should be 5 rows in the results. @@ -142,9 +133,6 @@ public function testViewElementEmbed() { // Test a form. $this->drupalGet('views_test_data_element_embed_form'); - $xpath = $this->xpath('//div[@class="views-element-container js-form-wrapper form-wrapper"]'); - $this->assertTrue($xpath, 'The view container has been found on the form.'); - $xpath = $this->xpath('//div[@class="view-content"]'); $this->assertTrue($xpath, 'The view content has been found on the form.'); // There should be 5 rows in the results.