@@ -153,9 +153,6 @@ Item {
153153
154154 var priv = findInvisibleChild(menu, "d");
155155
156− keyClick(Qt.Key_Down, Qt.NoModifier);
157− compare(priv.currentItem, item0, "CurrentItem should have moved to item 0");
158−
159156 keyClick(Qt.Key_Down, Qt.NoModifier);
160157 compare(priv.currentItem, item1, "CurrentItem should have moved to item 1");
161158
@@ -164,6 +161,9 @@ Item {
164161
165162 keyClick(Qt.Key_Down, Qt.NoModifier);
166163 compare(priv.currentItem, item0, "CurrentItem should have moved to item 0");
164+
165+ keyClick(Qt.Key_Down, Qt.NoModifier);
166+ compare(priv.currentItem, item1, "CurrentItem should have moved to item 1");
167167 }
168168
169169 function test_keyboardNavigation_UpKeySelectsAndOpensPreviousMenuItemAndRotates() {
@@ -175,17 +175,17 @@ Item {
175175
176176 var priv = findInvisibleChild(menu, "d");
177177
178− keyClick(Qt.Key_Down, Qt.NoModifier);
179− compare(priv.currentItem, item0, "CurrentItem should have moved to item 2");
178+ keyClick(Qt.Key_Up, Qt.NoModifier);
179+ compare(priv.currentItem, item2, "CurrentItem should have moved to item 2");
180180
181− keyClick(Qt.Key_Down, Qt.NoModifier);
181+ keyClick(Qt.Key_Up, Qt.NoModifier);
182182 compare(priv.currentItem, item1, "CurrentItem should have moved to item 1");
183183
184− keyClick(Qt.Key_Down, Qt.NoModifier);
185− compare(priv.currentItem, item2, "CurrentItem should have moved to item 0");
184+ keyClick(Qt.Key_Up, Qt.NoModifier);
185+ compare(priv.currentItem, item0, "CurrentItem should have moved to item 0");
186186
187− keyClick(Qt.Key_Down, Qt.NoModifier);
188− compare(priv.currentItem, item0, "CurrentItem should have moved to item 2");
187+ keyClick(Qt.Key_Up, Qt.NoModifier);
188+ compare(priv.currentItem, item2, "CurrentItem should have moved to item 2");
189189 }
190190
191191 function test_aboutToShow() {
@@ -242,7 +242,7 @@ Item {
242242
243243 var menuItem = findChild(menu, "menu-item0"); verify(menuItem);
244244 mouseClick(menuItem, menuItem.width/2, menuItem.height/2);
245− tryCompareFunction(function() { return menuItem.popup !== null && menuItem.popup.visible }, true);
245+ tryCompareFunction(function() { return menuItem.popup !== null && findInvisibleChild(menuItem.popup, "d").currentItem !== null }, true);
246246
247247 keyClick(Qt.Key_Left, Qt.NoModifier);
248248 tryCompareFunction(function() { return menuItem.popup !== null && menuItem.popup.visible }, false);
@@ -270,13 +270,16 @@ Item {
270270
271271 menu.unityMenuModel.modelData = differentSizesMenu;
272272
273− waitForRendering(menu);
273+ // Wait for the two items to be there
274+ tryCompareFunction(function() { return findChild(menu, "menu-item1") !== null; }, true);
274275 var longWidth = menu.width;
276+
277+ // Now pop one item and make sure it's smaller
275278 differentSizesMenu.pop();
276279 menu.unityMenuModel.modelData = differentSizesMenu;
277280
278− waitForRendering(menu);
279− verify(menu.width < longWidth);
281+ tryCompareFunction(function() { return findChild(menu, "menu-item0") !== null; }, true);
282+ tryCompareFunction(function() { return menu.width < longWidth; }, true);
280283 }
281284
282285 function test_minimumWidth() {