aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-07-20 15:36:01 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-07-20 14:28:08 +0000
commitfc5351039e6175fa599bb79a891fb1e1f32f7949 (patch)
tree940156de2e04181e997b022d4fe90b2f8ed94016 /tests
parent10fb81121502693bad3171ba6d7b3cbbad58858f (diff)
Fix tst_page::test_twoChildren()
Allow the background to have an implicit size. The Imagine style has a background image so it has an implicit size. Change-Id: I39b41d265cb36959b198e6dac6024f6b91f3c5c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_page.qml6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_page.qml b/tests/auto/controls/data/tst_page.qml
index 2eb11165..4fb2d089 100644
--- a/tests/auto/controls/data/tst_page.qml
+++ b/tests/auto/controls/data/tst_page.qml
@@ -150,8 +150,10 @@ TestCase {
compare(control.contentWidth, 0)
compare(control.contentHeight, 0)
- compare(control.implicitWidth, control.leftPadding + control.rightPadding)
- compare(control.implicitHeight, control.topPadding + control.bottomPadding)
+ compare(control.implicitWidth, Math.max(control.leftPadding + control.rightPadding,
+ control.background ? control.background.implicitWidth : 0))
+ compare(control.implicitHeight, Math.max(control.topPadding + control.bottomPadding,
+ control.background ? control.background.implicitHeight : 0))
}
function test_contentItem() {