@@ -76,6 +76,7 @@ Item {
76 property var menu: loader.status === Loader.Ready ? loader.item : null
76 property var menu: loader.status === Loader.Ready ? loader.item : null
78 function init() {
78 function init() {
79+ mouseMove(root, 0, 0);
79 loader.active = true;
80 loader.active = true;
80 menu.show();
81 menu.show();
@@ -141,7 +142,7 @@ Item {
142 mouseClick(menuItem, menuItem.width/2, menuItem.height/2);
143 mouseClick(menuItem, menuItem.width/2, menuItem.height/2);
144− compare(menuItem.action.checked, true, "Checkable menu item should have toggled");
145+ tryCompare(menuItem.action, "checked", true, 5000, "Checkable menu item should have toggled");
147 function test_keyboardNavigation_DownKeySelectsAndOpensNextMenuItemAndRotates() {
148 function test_keyboardNavigation_DownKeySelectsAndOpensNextMenuItemAndRotates() {
@@ -154,16 +155,16 @@ Item {
154 var priv = findInvisibleChild(menu, "d");
155 var priv = findInvisibleChild(menu, "d");
156 keyClick(Qt.Key_Down, Qt.NoModifier);
157 keyClick(Qt.Key_Down, Qt.NoModifier);
157− compare(priv.currentItem, item1, "CurrentItem should have moved to item 1");
158+ tryCompare(priv, "currentItem", item1);
159 keyClick(Qt.Key_Down, Qt.NoModifier);
160 keyClick(Qt.Key_Down, Qt.NoModifier);
160− compare(priv.currentItem, item2, "CurrentItem should have moved to item 2");
161+ tryCompare(priv, "currentItem", item2);
162 keyClick(Qt.Key_Down, Qt.NoModifier);
163 keyClick(Qt.Key_Down, Qt.NoModifier);
163− compare(priv.currentItem, item0, "CurrentItem should have moved to item 0");
164+ tryCompare(priv, "currentItem", item0);
165 keyClick(Qt.Key_Down, Qt.NoModifier);
166 keyClick(Qt.Key_Down, Qt.NoModifier);
166− compare(priv.currentItem, item1, "CurrentItem should have moved to item 1");
167+ tryCompare(priv, "currentItem", item1);
169 function test_keyboardNavigation_UpKeySelectsAndOpensPreviousMenuItemAndRotates() {
170 function test_keyboardNavigation_UpKeySelectsAndOpensPreviousMenuItemAndRotates() {
@@ -176,16 +177,16 @@ Item {
176 var priv = findInvisibleChild(menu, "d");
177 var priv = findInvisibleChild(menu, "d");
178 keyClick(Qt.Key_Up, Qt.NoModifier);
179 keyClick(Qt.Key_Up, Qt.NoModifier);
179− compare(priv.currentItem, item2, "CurrentItem should have moved to item 2");
180+ tryCompare(priv, "currentItem", item2);
181 keyClick(Qt.Key_Up, Qt.NoModifier);
182 keyClick(Qt.Key_Up, Qt.NoModifier);
182− compare(priv.currentItem, item1, "CurrentItem should have moved to item 1");
183+ tryCompare(priv, "currentItem", item1);
184 keyClick(Qt.Key_Up, Qt.NoModifier);
185 keyClick(Qt.Key_Up, Qt.NoModifier);
185− compare(priv.currentItem, item0, "CurrentItem should have moved to item 0");
186+ tryCompare(priv, "currentItem", item0);
187 keyClick(Qt.Key_Up, Qt.NoModifier);
188 keyClick(Qt.Key_Up, Qt.NoModifier);
188− compare(priv.currentItem, item2, "CurrentItem should have moved to item 2");
189+ tryCompare(priv, "currentItem", item2);
191 function test_aboutToShow() {
192 function test_aboutToShow() {