$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is no delete button on the default display.');
$this->drupalGet($path_prefix.'/page_1');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is a delete button on the page display.');
// Delete the page, so we can test the undo process.
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete','Undo delete of Page','Make sure there a undo button on the page display after deleting.');
$element=$this->xpath('//a[contains(@href, :href) and contains(@class, :class)]',array(':href'=>$path_prefix.'/page_1',':class'=>'views-display-deleted-link'));
$this->assertTrue(!empty($element),'Make sure the display link is marked as to be deleted.');
$element=$this->xpath('//a[contains(@href, :href) and contains(@class, :class)]',array(':href'=>$path_prefix.'/page_1',':class'=>'views-display-deleted-link'));
$this->assertTrue(!empty($element),'Make sure the display link is marked as to be deleted.');
// Undo the deleting of the display.
$this->drupalPostForm($path_prefix.'/page_1',array(),'Undo delete of Page');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete','Undo delete of Page','Make sure there is no undo button on the page display after reverting.');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is a delete button on the page display after the reverting.');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is no delete button on the default display.');
$this->drupalGet($path_prefix.'/page_1');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is a delete button on the page display.');
// Delete the page, so we can test the undo process.
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete','Undo delete of Page','Make sure there a undo button on the page display after deleting.');
$element=$this->xpath('//a[contains(@href, :href) and contains(@class, :class)]',array(':href'=>$path_prefix.'/page_1',':class'=>'views-display-deleted-link'));
$this->assertTrue(!empty($element),'Make sure the display link is marked as to be deleted.');
$element=$this->xpath('//a[contains(@href, :href) and contains(@class, :class)]',array(':href'=>$path_prefix.'/page_1',':class'=>'views-display-deleted-link'));
$this->assertTrue(!empty($element),'Make sure the display link is marked as to be deleted.');
// Undo the deleting of the display.
$this->drupalPostForm($path_prefix.'/page_1',array(),'Undo delete of Page');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete','Undo delete of Page','Make sure there is no undo button on the page display after reverting.');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is a delete button on the page display after the reverting.');