diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-04-11 20:25:01 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-04-11 20:25:01 +0000 |
commit | 8615db11a61178c5be5c2ef9e373ad0d245888d6 (patch) | |
tree | 04cd2ab41fdfd04cca1eac9f56d8aaaf5abbc23a /tests | |
parent | b663020c9a60704dc53014522a3faa23892280a0 (diff) | |
parent | 41d9718bc4ac005b82d64db8a4312e7fef7548d9 (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 25 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_scrollbar.qml | 20 |
2 files changed, 44 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index b2782b44..d51f16fb 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -769,4 +769,29 @@ TestCase { control.destroy() } + + Component { + id: asyncLoader + Loader { + active: false + asynchronous: true + sourceComponent: ComboBox { + model: ["First", "Second", "Third"] + } + } + } + + // QTBUG-51972 + function test_async() { + var loader = asyncLoader.createObject(testCase) + verify(loader) + + loader.active = true + tryCompare(loader, "status", Loader.Ready) + verify(loader.item) + compare(loader.item.currentText, "First") + compare(loader.item.displayText, "First") + + loader.destroy() + } } diff --git a/tests/auto/controls/data/tst_scrollbar.qml b/tests/auto/controls/data/tst_scrollbar.qml index 9fa6496e..eed995bf 100644 --- a/tests/auto/controls/data/tst_scrollbar.qml +++ b/tests/auto/controls/data/tst_scrollbar.qml @@ -57,7 +57,7 @@ TestCase { Component { id: scrollBar - ScrollBar { } + ScrollBar { padding: 0 } } Component { @@ -248,4 +248,22 @@ TestCase { control.destroy() } + + function test_padding_data() { + return [ + { tag: "horizontal", properties: { visible: true, orientation: Qt.Horizontal, width: testCase.width, leftPadding: testCase.width * 0.1 } }, + { tag: "vertical", properties: { visible: true, orientation: Qt.Vertical, height: testCase.height, topPadding: testCase.height * 0.1 } } + ] + } + + function test_padding(data) { + var control = scrollBar.createObject(testCase, data.properties) + + mousePress(control, control.leftPadding + control.availableWidth * 0.5, control.topPadding + control.availableHeight * 0.5, Qt.LeftButton) + mouseRelease(control, control.leftPadding + control.availableWidth * 0.5, control.topPadding + control.availableHeight * 0.5, Qt.LeftButton) + + compare(control.position, 0.5) + + control.destroy() + } } |