aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-18 14:35:54 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-18 12:37:31 +0000
commitc803830c02fb573582cd848185460ba65b4529e5 (patch)
treebc0e00a8c82b4242661d3d6f7beb77e3c5691623 /tests/auto/controls
parent9b67ed1dde437448b927ef839ca60a2820f021dc (diff)
Frame, GroupBox, ToolBar: restore contentWidth & contentHeight
Change-Id: I79a974c64f6ec57ebfa83cea0857b2a1590af61f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls')
-rw-r--r--tests/auto/controls/data/tst_frame.qml10
-rw-r--r--tests/auto/controls/data/tst_groupbox.qml10
-rw-r--r--tests/auto/controls/data/tst_toolbar.qml10
3 files changed, 24 insertions, 6 deletions
diff --git a/tests/auto/controls/data/tst_frame.qml b/tests/auto/controls/data/tst_frame.qml
index 5eb600de..43e0c298 100644
--- a/tests/auto/controls/data/tst_frame.qml
+++ b/tests/auto/controls/data/tst_frame.qml
@@ -82,11 +82,15 @@ TestCase {
function test_defaults() {
var control = frame.createObject(testCase)
verify(control.contentItem)
+ compare(control.contentWidth, 0)
+ compare(control.contentHeight, 0)
control.destroy()
}
function test_oneChild() {
var control = oneChildFrame.createObject(testCase)
+ compare(control.contentWidth, 100)
+ compare(control.contentHeight, 30)
verify(control.implicitWidth > 100)
verify(control.implicitHeight > 30)
control.destroy()
@@ -94,8 +98,10 @@ TestCase {
function test_twoChildren() {
var control = twoChildrenFrame.createObject(testCase)
- verify(control.implicitWidth > 200)
- verify(control.implicitHeight > 60)
+ compare(control.contentWidth, 0)
+ compare(control.contentHeight, 0)
+ verify(control.implicitWidth > 0)
+ verify(control.implicitHeight > 0)
control.destroy()
}
}
diff --git a/tests/auto/controls/data/tst_groupbox.qml b/tests/auto/controls/data/tst_groupbox.qml
index 760450f0..1a2f2efb 100644
--- a/tests/auto/controls/data/tst_groupbox.qml
+++ b/tests/auto/controls/data/tst_groupbox.qml
@@ -82,12 +82,16 @@ TestCase {
function test_defaults() {
var control = groupBox.createObject(testCase)
verify(control.contentItem)
+ compare(control.contentWidth, 0)
+ compare(control.contentHeight, 0)
compare(control.title, "")
control.destroy()
}
function test_oneChild() {
var control = oneChildBox.createObject(testCase)
+ compare(control.contentWidth, 100)
+ compare(control.contentHeight, 30)
verify(control.implicitWidth > 100)
verify(control.implicitHeight > 30)
control.destroy()
@@ -95,8 +99,10 @@ TestCase {
function test_twoChildren() {
var control = twoChildrenBox.createObject(testCase)
- verify(control.implicitWidth > 200)
- verify(control.implicitHeight > 60)
+ compare(control.contentWidth, 0)
+ compare(control.contentHeight, 0)
+ verify(control.implicitWidth > 0)
+ verify(control.implicitHeight > 0)
control.destroy()
}
}
diff --git a/tests/auto/controls/data/tst_toolbar.qml b/tests/auto/controls/data/tst_toolbar.qml
index 694e6e24..6b343894 100644
--- a/tests/auto/controls/data/tst_toolbar.qml
+++ b/tests/auto/controls/data/tst_toolbar.qml
@@ -82,11 +82,15 @@ TestCase {
function test_defaults() {
var control = toolBar.createObject(testCase)
verify(control.contentItem)
+ compare(control.contentWidth, 0)
+ compare(control.contentHeight, 0)
control.destroy()
}
function test_oneChild() {
var control = oneChildBar.createObject(testCase)
+ compare(control.contentWidth, 100)
+ compare(control.contentHeight, 30)
verify(control.implicitWidth > 100)
verify(control.implicitHeight > 30)
control.destroy()
@@ -94,8 +98,10 @@ TestCase {
function test_twoChildren() {
var control = twoChildrenBar.createObject(testCase)
- verify(control.implicitWidth > 200)
- verify(control.implicitHeight > 60)
+ compare(control.contentWidth, 0)
+ compare(control.contentHeight, 0)
+ verify(control.implicitWidth > 0)
+ verify(control.implicitHeight > 0)
control.destroy()
}
}