@@ -159,6 +159,20 @@ Item {
159 target: LauncherModel
159 target: LauncherModel
163+ id: fakeDismissTimer
164+ property bool running: false
171+ function restart() {
162 UnityTestCase {
176 UnityTestCase {
163 id: testCase
177 id: testCase
164 name: "Launcher"
178 name: "Launcher"
@@ -177,6 +191,11 @@ Item {
177 launcherLoader.active = true;
191 launcherLoader.active = true;
179 function init() {
193 function init() {
194+ var panel = findChild(launcher, "launcherPanel");
197+ panel.dismissTimer = fakeDismissTimer;
180 // Make sure we don't start the test with the mouse hovering the launcher
199 // Make sure we don't start the test with the mouse hovering the launcher
181 mouseMove(root, root.width, root.height / 2);
200 mouseMove(root, root.width, root.height / 2);
@@ -897,6 +916,11 @@ Item {
897 // Now move the mouse away and make sure it hides in less than a second
916 // Now move the mouse away and make sure it hides in less than a second
898 mouseMove(root, root.width, root.height / 2)
917 mouseMove(root, root.width, root.height / 2)
919+ // trigger the hide timer
920+ compare(fakeDismissTimer.running, true);
921+ fakeDismissTimer.triggered();
922+ tryCompare(panel, "x", 0);
900 tryCompare(launcher, "state", "", 1000, "Launcher didn't hide after moving mouse away from it");
924 tryCompare(launcher, "state", "", 1000, "Launcher didn't hide after moving mouse away from it");
901 waitUntilLauncherDisappears();
925 waitUntilLauncherDisappears();