diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-02-26 12:37:40 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-26 15:04:40 +0100 |
commit | fae2e870ced5766061fe8e9f4c10183efefa024e (patch) | |
tree | 666e76db0c570d1919ac9932035ea82785efee84 /tests/auto/controls/data/tst_applicationwindow.qml | |
parent | 41f44e224695789974e2c92db95810e19e6fab49 (diff) | |
download | qtquickcontrols-fae2e870ced5766061fe8e9f4c10183efefa024e.tar.gz |
Revise tst_applicationwindow
Use more reliable/applicable waitForRendering(item) instead of wait(0)
and make the window visible before testing content item geometry.
Task-number: QTBUG-36938
Change-Id: I414749019d1fca01c09ab3361c0355d231b2bcb3
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_applicationwindow.qml')
-rw-r--r-- | tests/auto/controls/data/tst_applicationwindow.qml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/controls/data/tst_applicationwindow.qml b/tests/auto/controls/data/tst_applicationwindow.qml index 590231f4..cfe6e0a3 100644 --- a/tests/auto/controls/data/tst_applicationwindow.qml +++ b/tests/auto/controls/data/tst_applicationwindow.qml @@ -58,6 +58,7 @@ TestCase { var test_control = 'import QtQuick 2.1; \ import QtQuick.Controls 1.1; \ ApplicationWindow { \ + visible: true; \ width: 100; height: 100; \ property alias contentArea: rect; \ statusBar: StatusBar { \ @@ -80,17 +81,17 @@ TestCase { } ' var window = Qt.createQmlObject(test_control, container, '') - wait(0) var contentArea = window.contentArea + waitForRendering(contentArea) var oldHeight = contentArea.height compare(contentArea.height, 100) window.statusBar.visible = true - wait(0) + waitForRendering(window.statusBar) verify(contentArea.height < oldHeight) oldHeight = contentArea.height; window.toolBar.visible = true - wait(0) + waitForRendering(window.toolBar) verify(contentArea.height < oldHeight) window.destroy() } |