aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_popup.qml31
-rw-r--r--tests/auto/controls/data/tst_scrollbar.qml16
-rw-r--r--tests/auto/controls/data/tst_scrollindicator.qml16
-rw-r--r--tests/auto/drawer/tst_drawer.cpp2
4 files changed, 64 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml
index c81c6341..982ac7ab 100644
--- a/tests/auto/controls/data/tst_popup.qml
+++ b/tests/auto/controls/data/tst_popup.qml
@@ -1229,4 +1229,35 @@ TestCase {
control.destroy()
}
+
+ Component {
+ id: xyBindingLoop
+ ApplicationWindow {
+ id: window
+ width: 360
+ height: 360
+ visible: true
+ property alias popup: popup
+
+ Popup {
+ id: popup
+ visible: true
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ Label {
+ text: "Content"
+ anchors.fill: parent
+ }
+ }
+ }
+ }
+
+ function test_xyBindingLoop() {
+ var window = xyBindingLoop.createObject(testCase)
+ var control = window.popup
+ waitForRendering(control.contentItem)
+ compare(control.x, (control.parent.width - control.width) / 2)
+ compare(control.y, (control.parent.height - control.height) / 2)
+ window.destroy()
+ }
}
diff --git a/tests/auto/controls/data/tst_scrollbar.qml b/tests/auto/controls/data/tst_scrollbar.qml
index 15b4b3f0..54ecf15f 100644
--- a/tests/auto/controls/data/tst_scrollbar.qml
+++ b/tests/auto/controls/data/tst_scrollbar.qml
@@ -155,6 +155,22 @@ TestCase {
compare(horizontal.size, container.visibleArea.widthRatio)
compare(horizontal.position, container.visibleArea.xPosition)
+ var oldY = vertical.y
+ var oldHeight = vertical.height
+ vertical.parent = testCase
+ vertical.y -= 10
+ container.height += 10
+ compare(vertical.y, oldY - 10)
+ compare(vertical.height, oldHeight)
+
+ var oldX = horizontal.x
+ var oldWidth = horizontal.width
+ horizontal.parent = testCase
+ horizontal.x -= 10
+ container.width += 10
+ compare(horizontal.x, oldX - 10)
+ compare(horizontal.width, oldWidth)
+
container.destroy()
}
diff --git a/tests/auto/controls/data/tst_scrollindicator.qml b/tests/auto/controls/data/tst_scrollindicator.qml
index 551247f6..1ec03b15 100644
--- a/tests/auto/controls/data/tst_scrollindicator.qml
+++ b/tests/auto/controls/data/tst_scrollindicator.qml
@@ -150,6 +150,22 @@ TestCase {
compare(horizontal.size, container.visibleArea.widthRatio)
compare(horizontal.position, container.visibleArea.xPosition)
+ var oldY = vertical.y
+ var oldHeight = vertical.height
+ vertical.parent = testCase
+ vertical.y -= 10
+ container.height += 10
+ compare(vertical.y, oldY - 10)
+ compare(vertical.height, oldHeight)
+
+ var oldX = horizontal.x
+ var oldWidth = horizontal.width
+ horizontal.parent = testCase
+ horizontal.x -= 10
+ container.width += 10
+ compare(horizontal.x, oldX - 10)
+ compare(horizontal.width, oldWidth)
+
container.destroy()
}
diff --git a/tests/auto/drawer/tst_drawer.cpp b/tests/auto/drawer/tst_drawer.cpp
index 58a5ba3c..a523beed 100644
--- a/tests/auto/drawer/tst_drawer.cpp
+++ b/tests/auto/drawer/tst_drawer.cpp
@@ -380,7 +380,7 @@ void tst_Drawer::reposition()
window->setWidth(window->width() + 100);
QTRY_COMPARE(geometry(dimmer), QRectF(0, 150, window->width(), window->height() - 150));
- QCOMPARE(geometry(popupItem), QRectF(window->width() - drawer->width(), 150, window->width() / 2, window->height() - 150));
+ QTRY_COMPARE(geometry(popupItem), QRectF(window->width() - drawer->width(), 150, window->width() / 2, window->height() - 150));
drawer->close();
QTRY_COMPARE(geometry(popupItem), QRectF(window->width(), 150, window->width() / 2, window->height() - 150));