diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_page_display_menu.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_page_display_menu.yml
index a1eb3b5..d0219e9 100644
--- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_page_display_menu.yml
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_page_display_menu.yml
@@ -120,3 +120,28 @@ display:
     display_title: Page
     id: page_5
     position: 0
+  page_6:
+    display_options:
+      path: test_page_display_menu/test_default_local_task/one
+      title: 'Tests a default local task without an existing parent'
+      menu:
+        type: 'default tab'
+        title: 'Test child'
+        description: ''
+        expanded: false
+        parent: ''
+        menu_name: main
+        weight: 0
+        context: '0'
+      tab_options:
+        type: tab
+        title: 'Test parent'
+        description: ''
+        menu_name: main
+        weight: 0
+      defaults:
+        title: false
+    display_plugin: page
+    display_title: Page
+    id: page_6
+    position: 0
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
index 501d922..180492b 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
@@ -108,6 +108,16 @@ public function testPageDisplayMenu() {
     $this->assertEqual($element[0]->getText(), t('Test local tab'));
     $this->assertTitle(t('Test local page | Drupal'));

+    // Check that a parent local task is created  for a default local task.
+    $this->drupalGet('test_page_display_menu/test_default_local_task');
+    $this->assertResponse(200);
+    $element = $this->xpath('//ul[contains(@class, :ul_class)]//a[contains(@class, :a_class)]/child::text()', [
+      ':ul_class' => 'tabs primary',
+      ':a_class' => 'is-active',
+    ]);
+    $this->assertEqual($element[0]->getText(), t('Test parent'));
+    $this->assertTitle(t('Tests a default local task without an existing parent | Drupal'));
+
     // Check an ordinary menu link.
     $admin_user = $this->drupalCreateUser(['administer menu']);
     $this->drupalLogin($admin_user);
diff --git a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php
index 7ecf9ef..7d4f7d8 100644
--- a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php
@@ -238,10 +238,20 @@ public function testGetDerivativeDefinitionsWithDefaultLocalTask() {
       ->setMethods(['getOption'])
       ->disableOriginalConstructor()
       ->getMockForAbstractClass();
-    $display_plugin->expects($this->exactly(2))
+    $display_plugin->expects($this->exactly(4))
       ->method('getOption')
-      ->with('menu')
-      ->will($this->returnValue(['type' => 'default tab', 'weight' => 12, 'title' => 'Example title']));
+      ->with($this->logicalOr('menu', 'tab_options'))
+      ->will($this->returnValueMap([
+        [
+          'menu',
+          [
+            'type' => 'default tab',
+            'weight' => 12,
+            'title' => 'Example title',
+          ],
+        ],
+        ['tab_options', ['type' => 'none']],
+      ]));
     $executable->display_handler = $display_plugin;

     $result = [['example_view', 'page_1']];
@@ -279,6 +289,113 @@ public function testGetDerivativeDefinitionsWithDefaultLocalTask() {
   }

   /**
+   * Tests fetching the derivatives on a view with a default local task.
+   */
+  public function testGetDerivativeDefinitionsWithParentLocalTask() {
+    $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
+      ->disableOriginalConstructor()
+      ->getMock();
+    $storage = $this->getMockBuilder('Drupal\views\Entity\View')
+      ->disableOriginalConstructor()
+      ->getMock();
+    $storage->expects($this->any())
+      ->method('id')
+      ->will($this->returnValue('example_view'));
+    $storage->expects($this->any())
+      ->method('getExecutable')
+      ->willReturn($executable);
+    $executable->storage = $storage;
+
+    $this->viewStorage->expects($this->any())
+      ->method('load')
+      ->with('example_view')
+      ->willReturn($storage);
+
+    $display_plugin = $this->getMockBuilder('Drupal\views\Plugin\views\display\PathPluginBase')
+      ->setMethods(['getOption', 'getPath'])
+      ->disableOriginalConstructor()
+      ->getMockForAbstractClass();
+    $display_plugin->expects($this->exactly(4))
+      ->method('getOption')
+      ->with($this->logicalOr('menu', 'tab_options'))
+      ->will($this->returnValueMap([
+        [
+          'menu',
+          [
+            'type' => 'default tab',
+            'weight' => 12,
+            'title' => 'Example title',
+          ],
+        ],
+        [
+          'tab_options',
+          [
+            'type' => 'tab',
+            'weight' => 5,
+            'title' => 'Example parent title',
+          ],
+        ],
+      ]));
+    $display_plugin->expects($this->once())
+      ->method('getPath')
+      ->will($this->returnValue('path/example'));
+    $executable->display_handler = $display_plugin;
+
+    $result = [['example_view', 'page_1']];
+    $this->localTaskDerivative->setApplicableMenuViews($result);
+
+    // Mock the view route names state.
+    $view_route_names = [];
+    $view_route_names['example_view.page_1'] = 'view.example_view.page_1';
+    $this->state->expects($this->exactly(2))
+      ->method('get')
+      ->with('views.view_route_names')
+      ->will($this->returnValue($view_route_names));
+
+    // Mock the route provider.
+    $route_collection = new RouteCollection();
+    $route_collection->add('test_route', new Route('/path'));
+    $this->routeProvider->expects($this->any())
+      ->method('getRoutesByPattern')
+      ->with('/path')
+      ->will($this->returnValue($route_collection));
+
+    $definitions = $this->localTaskDerivative->getDerivativeDefinitions($this->baseDefinition);
+    $this->assertCount(2, $definitions);
+    $plugin = $definitions['view.example_view.page_1'];
+    $this->assertEquals('view.example_view.page_1', $plugin['route_name']);
+    $this->assertEquals(12, $plugin['weight']);
+    $this->assertEquals('Example title', $plugin['title']);
+    $this->assertEquals($this->baseDefinition['class'], $plugin['class']);
+    $this->assertEquals('views_view:view.example_view.page_1.parent', $plugin['parent_id']);
+    $parent = $definitions['view.example_view.page_1.parent'];
+    $this->assertEquals('view.example_view.page_1', $parent['route_name']);
+    $this->assertEquals(5, $parent['weight']);
+    $this->assertEquals('Example parent title', $parent['title']);
+    $this->assertEquals($this->baseDefinition['class'], $parent['class']);
+
+    // Setup the prefix of the derivative.
+    $definitions['views_view:view.example_view.page_1'] = $definitions['view.example_view.page_1'];
+    $definitions['views_view:view.example_view.page_1.parent'] = $definitions['view.example_view.page_1.parent'];
+    unset($definitions['view.example_view.page_1'], $definitions['view.example_view.page_1.parent']);
+    $this->localTaskDerivative->alterLocalTasks($definitions);
+
+    $plugin = $definitions['views_view:view.example_view.page_1'];
+    $this->assertCount(2, $definitions);
+    $this->assertEquals('view.example_view.page_1', $plugin['route_name']);
+    $this->assertEquals(12, $plugin['weight']);
+    $this->assertEquals('Example title', $plugin['title']);
+    $this->assertEquals($this->baseDefinition['class'], $plugin['class']);
+    $this->assertEquals('views_view:view.example_view.page_1.parent', $plugin['parent_id']);
+    $parent = $definitions['views_view:view.example_view.page_1.parent'];
+    $this->assertEquals('view.example_view.page_1', $parent['route_name']);
+    $this->assertEquals(5, $parent['weight']);
+    $this->assertEquals('Example parent title', $parent['title']);
+    $this->assertEquals($this->baseDefinition['class'], $parent['class']);
+    $this->assertEquals('test_route', $parent['base_route']);
+  }
+
+  /**
    * Tests fetching the derivatives on a view with a local task and a parent.
    *
    * The parent is defined by another module, not views.
