diff --git a/core/modules/views/src/Element/View.php b/core/modules/views/src/Element/View.php index 43d1058..6807e38 100644 --- a/core/modules/views/src/Element/View.php +++ b/core/modules/views/src/Element/View.php @@ -90,10 +90,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'] = ['container']; - } } return $element; diff --git a/core/modules/views/src/Tests/ViewElementTest.php b/core/modules/views/src/Tests/ViewElementTest.php index ff11dc2..031e7e5 100644 --- a/core/modules/views/src/Tests/ViewElementTest.php +++ b/core/modules/views/src/Tests/ViewElementTest.php @@ -38,9 +38,6 @@ public function testViewElement() { $this->assertEqual($render['#embed'], FALSE); $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. @@ -50,9 +47,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. @@ -107,9 +101,6 @@ public function testViewElementEmbed() { $this->assertEqual($render['#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. @@ -119,9 +110,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.