@@ -511,5 +511,53 @@ Item {
511 var lockscreen = findChild(shell, "lockscreen");
511 var lockscreen = findChild(shell, "lockscreen");
512 verify(lockscreen.shown);
512 verify(lockscreen.shown);
516+ Regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1393447
518+ Do a left edge drag that is long enough to start displacing the greeter
519+ but short engough so that the greeter comes back into place once the
522+ In this situation the launcher should remaing fully shown and hide itself
523+ only after its idle timeout is triggered.
525+ function test_shortLeftEdgeSwipeMakesLauncherStayVisible() {
526+ var greeter = testCase.findChild(shell, "greeter")
528+ tryCompare(greeter, "showProgress", 1);
530+ var launcher = testCase.findChild(shell, "launcher")
532+ var dismissTimer = testCase.findInvisibleChild(launcher, "dismissTimer");
533+ // effectively disable the dismiss timer
534+ dismissTimer.interval = 24 * 60 * 60 * 1000 // 24 hours
536+ var launcherPanel = testCase.findChild(launcher, "launcherPanel");
538+ var toX = shell.width * 0.45;
540+ 1 /* fromX */, shell.height * 0.5 /* fromY */,
541+ toX /* toX */, shell.height * 0.5 /* toY */,
542+ true /* beginTouch */, false /* endTouch */,
545+ // Launcher must be fully shown by now
546+ tryCompare(launcherPanel, "x", 0);
548+ // Greeter should be displaced
549+ tryCompareFunction(function() { return greeter.mapToItem(shell, 0, 0).x > shell.width*0.2; }, true);
551+ touchRelease(shell, toX, shell.height * 0.5);
553+ // Upon release the greeter should have slid back into full view
554+ tryCompareFunction(function() { return greeter.mapToItem(shell, 0, 0).x === 0; }, true);
556+ // And the launcher should stay fully shown
557+ for (var i = 0; i < 10; ++i) {
559+ compare(launcherPanel.x, 0);