@@ -30,6 +30,20 @@ TestCase {
3030 id: testObject
3131 }
3232
33+ Item {
34+ id: item
35+ Behavior on height {
36+ NumberAnimation {
37+ duration: 500
38+ }
39+ }
40+ Behavior on width {
41+ NumberAnimation {
42+ duration: 100
43+ }
44+ }
45+ }
46+
3347 function test_direct() {
3448 compare(Util.isInstanceOf(rect, "QQuickRectangle"), true, "rect should be an instance of QQuickRectangle");
3549 compare(Util.isInstanceOf(Util, "TestUtil"), true, "Util should be an instance of TestUtil");
@@ -52,4 +66,21 @@ TestCase {
5266 function test_undefined() {
5367 compare(Util.isInstanceOf(undefined, "QObject"), false, "passing undefined should fail");
5468 }
69+
70+ function test_behavior_waiting() {
71+ item.height = 100;
72+ verify(item.height != 100);
73+
74+ item.width = 100;
75+ verify(item.width != 100);
76+
77+ var date1 = new Date();
78+ Util.waitForBehaviors(item);
79+ var date2 = new Date();
80+
81+ compare(item.height, 100);
82+ compare(item.width, 100);
83+
84+ verify(date2 - date1 >= 500);
85+ }
5586}