@@ -263,6 +263,10 @@ PanelTest {
263 PanelState.title = "";
263 PanelState.title = "";
264 PanelState.decorationsVisible = false;
264 PanelState.decorationsVisible = false;
266+ // Put the mouse somewhere neutral so it doesn't hover over things
267+ // and mess up the test
268+ mouseMove(root, 0, 100);
266 // Wait for the indicators to get into position.
270 // Wait for the indicators to get into position.
267 // (switches between normal and fullscreen modes are animated)
271 // (switches between normal and fullscreen modes are animated)
268 var panelArea = findChild(panel, "panelArea");
272 var panelArea = findChild(panel, "panelArea");
@@ -772,9 +776,9 @@ PanelTest {
775− function test_stagedApplicationMenuBarShowOnMouseHover() {
779+ function test_windowedApplicationMenuBarShowOnMouseHover() {
776 PanelState.title = "Fake Title";
780 PanelState.title = "Fake Title";
777− panel.mode = "staged";
781+ panel.mode = "windowed";
778 mouseEmulation.checked = false;
782 mouseEmulation.checked = false;
780 var appTitle = findChild(panel, "panelTitle"); verify(appTitle);
784 var appTitle = findChild(panel, "panelTitle"); verify(appTitle);
@@ -786,7 +790,11 @@ PanelTest {
787 mouseMove(panel, panel.width/2, panel.panelHeight);
791 mouseMove(panel, panel.width/2, panel.panelHeight);
789− var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar);
793+ waitForRendering(panel);
795+ var appMenuBarLoader = findChild(panel, "menuBarLoader")
796+ tryVerify(function() {return appMenuBarLoader.item});
797+ var appMenuBar = appMenuBarLoader.item
790 tryCompare(appTitle, "visible", false, undefined, "App title should not be visible on mouse hover");
798 tryCompare(appTitle, "visible", false, undefined, "App title should not be visible on mouse hover");
791 tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover");
799 tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover");
@@ -833,7 +841,8 @@ PanelTest {
834 var indicatorsBar = findChild(panel.applicationMenus, "indicatorsBar");
842 var indicatorsBar = findChild(panel.applicationMenus, "indicatorsBar");
836− PanelState.title = "Fake Title"
844+ PanelState.title = "Fake Title";
845+ waitForRendering(panel);
837 pullDownApplicationsMenu(0 /*xPos*/);
846 pullDownApplicationsMenu(0 /*xPos*/);
838 compare(aboutToShowCalledSpy.count, 1);
847 compare(aboutToShowCalledSpy.count, 1);