public void ToolStripAccessibleObjectWrapperForItemsOnOverflow_Role_IsPushButton_ByDefault()
        {
            using ToolStrip toolStrip           = new ToolStrip();
            using ToolStripButton toolStripItem = new ToolStripButton();
            toolStrip.Items.Add(toolStripItem);
            toolStripItem.SetPlacement(ToolStripItemPlacement.Overflow);
            // AccessibleRole is not set = Default

            AccessibleObject accessibleObject = toolStrip.AccessibilityObject.GetChild(1);
            AccessibleRole   actual           = accessibleObject.Role;

            Assert.Equal(AccessibleRole.PushButton, actual);
            Assert.False(toolStrip.IsHandleCreated);
        }
        public void ToolStripAccessibleObjectWrapperForItemsOnOverflow_GetPropertyValue_ControlType_IsExpected_ForCustomRole(AccessibleRole role)
        {
            using ToolStrip toolStrip           = new ToolStrip();
            using ToolStripButton toolStripItem = new ToolStripButton();
            toolStrip.Items.Add(toolStripItem);
            toolStripItem.SetPlacement(ToolStripItemPlacement.Overflow);
            toolStripItem.AccessibleRole = role;

            AccessibleObject accessibleObject = toolStrip.AccessibilityObject.GetChild(1);
            AccessibleRole   actual           = accessibleObject.Role;

            Assert.Equal(role, actual);
            Assert.False(toolStrip.IsHandleCreated);
        }
        public void ToolStripAccessibleObjectWrapperForItemsOnOverflow_ControlType_IsPane_IfAccessibleRoleIsDefault()
        {
            using ToolStrip toolStrip           = new ToolStrip();
            using ToolStripButton toolStripItem = new ToolStripButton();
            toolStrip.Items.Add(toolStripItem);
            toolStripItem.SetPlacement(ToolStripItemPlacement.Overflow);
            // AccessibleRole is not set = Default

            AccessibleObject accessibleObject = toolStrip.AccessibilityObject.GetChild(1);
            object           actual           = accessibleObject.GetPropertyValue(UiaCore.UIA.ControlTypePropertyId);

            Assert.Equal(UiaCore.UIA.ButtonControlTypeId, actual);
            Assert.False(toolStrip.IsHandleCreated);
        }