aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmltest/listview/tst_listview.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmltest/listview/tst_listview.qml')
-rw-r--r--tests/auto/qmltest/listview/tst_listview.qml38
1 files changed, 37 insertions, 1 deletions
diff --git a/tests/auto/qmltest/listview/tst_listview.qml b/tests/auto/qmltest/listview/tst_listview.qml
index 78e2e6d7dd..7230638cd1 100644
--- a/tests/auto/qmltest/listview/tst_listview.qml
+++ b/tests/auto/qmltest/listview/tst_listview.qml
@@ -84,6 +84,23 @@ Item {
}
}
+ ListView {
+ id: asyncListViewLoaderView
+ width: 360
+ height: 360
+ model: asyncListViewLoaderModel
+
+ currentIndex: 0
+
+ delegate: Loader {
+ width: asyncListViewLoaderView.width
+ height: asyncListViewLoaderView.height
+
+ source: component
+ asynchronous: true
+ }
+ }
+
ListModel { id: emptymodel }
ListModel { id: manyitems }
ListModel { id: firstmodel; ListElement { name: "FirstModelElement0" } }
@@ -98,10 +115,18 @@ Item {
ListElement { component: "data/asyncloadercurrentindex.qml" }
ListElement { component: "data/asyncloadercurrentindex.qml" }
}
-
+ ListModel {
+ id: asyncListViewLoaderModel
+ ListElement { component: "data/asynclistviewloader.qml" }
+ ListElement { component: "data/asynclistviewloader.qml" }
+ ListElement { component: "data/asynclistviewloader.qml" }
+ ListElement { component: "data/asynclistviewloader.qml" }
+ ListElement { component: "data/asynclistviewloader.qml" }
+ }
TestCase {
name: "ListView"
+ when: windowShown
function test_empty() {
compare(emptylist.count, 0)
@@ -211,5 +236,16 @@ Item {
}
wait(1000)
}
+
+ function test_asyncListViewLoader() {
+ for (var i = 0; i < 50; i++) {
+ wait(10);
+ asyncListViewLoaderView.currentIndex = 0;
+ asyncListViewLoaderView.currentIndex = 1;
+ asyncListViewLoaderView.currentIndex = 2;
+ asyncListViewLoaderView.currentIndex = 3;
+ asyncListViewLoaderView.currentIndex = 4;
+ }
+ }
}
}