aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_popup.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls/data/tst_popup.qml')
-rw-r--r--tests/auto/controls/data/tst_popup.qml29
1 files changed, 25 insertions, 4 deletions
diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml
index 20859dac..7a34834e 100644
--- a/tests/auto/controls/data/tst_popup.qml
+++ b/tests/auto/controls/data/tst_popup.qml
@@ -52,11 +52,16 @@ TestCase {
name: "Popup"
Component {
- id: popup
+ id: popupTemplate
T.Popup { }
}
Component {
+ id: popupControl
+ Popup { }
+ }
+
+ Component {
id: rect
Rectangle { }
}
@@ -97,7 +102,7 @@ TestCase {
}
function test_padding() {
- var control = popup.createObject(testCase)
+ var control = popupTemplate.createObject(testCase)
verify(control)
paddingSpy.target = control
@@ -205,7 +210,7 @@ TestCase {
}
function test_availableSize() {
- var control = popup.createObject(testCase)
+ var control = popupTemplate.createObject(testCase)
verify(control)
availableWidthSpy.target = control
@@ -277,7 +282,7 @@ TestCase {
}
function test_background() {
- var control = popup.createObject(testCase)
+ var control = popupTemplate.createObject(testCase)
verify(control)
control.background = rect.createObject(testCase)
@@ -591,4 +596,20 @@ TestCase {
control.destroy()
}
+
+ function test_size() {
+ var control = popupControl.createObject(testCase)
+ verify(control)
+
+ control.width = 200
+ control.height = 200
+
+ control.open()
+ waitForRendering(control.contentItem)
+
+ compare(control.width, 200)
+ compare(control.height, 200)
+
+ control.destroy()
+ }
}