diff options
Diffstat (limited to 'tests/auto/controls/data/tst_toolbar.qml')
-rw-r--r-- | tests/auto/controls/data/tst_toolbar.qml | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/tests/auto/controls/data/tst_toolbar.qml b/tests/auto/controls/data/tst_toolbar.qml index ac116a86..128aa403 100644 --- a/tests/auto/controls/data/tst_toolbar.qml +++ b/tests/auto/controls/data/tst_toolbar.qml @@ -57,7 +57,7 @@ TestCase { Component { id: oneChildBar - GroupBox { + ToolBar { Item { implicitWidth: 100 implicitHeight: 30 @@ -67,7 +67,7 @@ TestCase { Component { id: twoChildrenBar - GroupBox { + ToolBar { Item { implicitWidth: 100 implicitHeight: 30 @@ -79,6 +79,16 @@ TestCase { } } + Component { + id: contentBar + ToolBar { + contentItem: Item { + implicitWidth: 100 + implicitHeight: 30 + } + } + } + function test_empty() { var control = toolBar.createObject(testCase) verify(control) @@ -96,8 +106,8 @@ TestCase { compare(control.contentWidth, 100) compare(control.contentHeight, 30) - verify(control.implicitWidth > 100) - verify(control.implicitHeight > 30) + verify(control.implicitWidth >= 100) + verify(control.implicitHeight >= 30) control.destroy() } @@ -108,8 +118,20 @@ TestCase { compare(control.contentWidth, 0) compare(control.contentHeight, 0) - verify(control.implicitWidth > 0) - verify(control.implicitHeight > 0) + verify(control.implicitWidth >= 0) + verify(control.implicitHeight >= 0) + + control.destroy() + } + + function test_contentItem() { + var control = contentBar.createObject(testCase) + verify(control) + + compare(control.contentWidth, 100) + compare(control.contentHeight, 30) + verify(control.implicitWidth >= 100) + verify(control.implicitHeight >= 30) control.destroy() } |