@@ -503,5 +503,54 @@ Item {
503 var lockscreen = findChild(shell, "lockscreen");
503 var lockscreen = findChild(shell, "lockscreen");
504 verify(lockscreen.shown);
504 verify(lockscreen.shown);
508+ Regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1393447
510+ Do a left edge drag that is long enough to start displacing the greeter
511+ but short engough so that the greeter comes back into place once the
514+ In this situation the launcher should remaing fully shown and hide itself
515+ only after its idle timeout is triggered.
517+ function test_shortLeftEdgeSwipeMakesLauncherStayVisible() {
518+ var greeter = testCase.findChild(shell, "greeter")
520+ // wait until the animation has finished (ie, greeter is fully visible)
521+ tryCompareFunction(function() { return greeter.mapToItem(shell, 0, 0).x === 0; }, true);
523+ var launcher = testCase.findChild(shell, "launcher")
525+ var dismissTimer = testCase.findInvisibleChild(launcher, "dismissTimer");
526+ // effectively disable the dismiss timer
527+ dismissTimer.interval = 24 * 60 * 60 * 1000 // 24 hours
529+ var launcherPanel = testCase.findChild(launcher, "launcherPanel");
531+ var toX = shell.width * 0.45;
533+ 1 /* fromX */, shell.height * 0.5 /* fromY */,
534+ toX /* toX */, shell.height * 0.5 /* toY */,
535+ true /* beginTouch */, false /* endTouch */,
538+ // Launcher must be fully shown by now
539+ tryCompare(launcherPanel, "x", 0);
541+ // Greeter should be displaced
542+ tryCompareFunction(function() { return greeter.mapToItem(shell, 0, 0).x > shell.width*0.2; }, true);
544+ touchRelease(shell, toX, shell.height * 0.5);
546+ // Upon release the greeter should have slid back into full view
547+ tryCompareFunction(function() { return greeter.mapToItem(shell, 0, 0).x === 0; }, true);
549+ // And the launcher should stay fully shown
550+ for (var i = 0; i < 10; ++i) {
552+ compare(launcherPanel.x, 0);