@@ -263,6 +263,10 @@ PanelTest {
263263 PanelState.title = "";
264264 PanelState.decorationsVisible = false;
265265
266+ // Put the mouse somewhere neutral so it doesn't hover over things
267+ // and mess up the test
268+ mouseMove(root, 0, 100);
269+
266270 // Wait for the indicators to get into position.
267271 // (switches between normal and fullscreen modes are animated)
268272 var panelArea = findChild(panel, "panelArea");
@@ -772,9 +776,9 @@ PanelTest {
772776 }
773777 }
774778
775− function test_stagedApplicationMenuBarShowOnMouseHover() {
779+ function test_windowedApplicationMenuBarShowOnMouseHover() {
776780 PanelState.title = "Fake Title";
777− panel.mode = "staged";
781+ panel.mode = "windowed";
778782 mouseEmulation.checked = false;
779783
780784 var appTitle = findChild(panel, "panelTitle"); verify(appTitle);
@@ -786,7 +790,11 @@ PanelTest {
786790
787791 mouseMove(panel, panel.width/2, panel.panelHeight);
788792
789− var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar);
793+ waitForRendering(panel);
794+
795+ var appMenuBarLoader = findChild(panel, "menuBarLoader")
796+ tryVerify(function() {return appMenuBarLoader.item});
797+ var appMenuBar = appMenuBarLoader.item
790798 tryCompare(appTitle, "visible", false, undefined, "App title should not be visible on mouse hover");
791799 tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover");
792800 }
@@ -833,7 +841,8 @@ PanelTest {
833841
834842 var indicatorsBar = findChild(panel.applicationMenus, "indicatorsBar");
835843
836− PanelState.title = "Fake Title"
844+ PanelState.title = "Fake Title";
845+ waitForRendering(panel);
837846 pullDownApplicationsMenu(0 /*xPos*/);
838847 compare(aboutToShowCalledSpy.count, 1);
839848