~ci-train-bot/unity8/unity8-ubuntu-yakkety-landing-055

« back to all changes in this revision

Viewing changes to tests/qmltests/tst_OrientedShell.qml

  • Committer: Bileto Bot
  • Author(s): Michael Terry
  • Date: 2016-07-11 17:23:38 UTC
  • mfrom: (1789.9.15 greeter-focus-true)
  • Revision ID: ci-train-bot@canonical.com-20160711172338-17q0ven6n973k5v8
Fix tablet greeter focus to be always-on, no longer hiding the OSK or forcing a mouse click to type a password.

I've also squeezed some other small fixes in:

- Support Up and Down keys in user list.
- Don't accept non-digit characters when prompting for passcode (we ask OSK to show only digits, but due to bug 1586435, it shows other characters too; plus if the user has an external keyboard, they can type anything anyway).
- When prompting for a passcode in wide-view (tablet/desktop), stop at 4 digits just like we do in narrow-view.
- Don't show "Retry" during brief period before a prompt comes in from PAM.
- Don't let user drag user list if there's only one entry.

Now as for the focus changes...

One of the big reasons we lost keyboard focus before was because we set the shell to disabled whenever the greeter was "between PAM events" -- mostly so that the user can't swipe away greeter before we get our first prompt or are otherwise unsure about exactly what authentication is needed.

But disabled qml items can't be focused.  So I've rejiggered things a bit.  Instead of disabling the whole shell, I just disable the launcher, the indicators, and make the greeter non-swipeable.

I also do some tricks with the prompt so that it looks disabled (while we check with PAM about the password) but isn't actually.  I don't want to make it look to the user that pressing backspace while they wait for PAM does anything, so after the user presses Enter, I present a fake label on top of the prompt that looks like a disabled prompt, while simultaneously hiding the prompt contents. (LP: #1435923)

Show diffs side-by-side

added added

removed removed

Lines of Context:
493
493
        }
494
494
 
495
495
        function cleanup() {
496
 
            tryCompare(shell, "enabled", true); // make sure greeter didn't leave us in disabled state
 
496
            tryCompare(shell, "waitingOnGreeter", false); // make sure greeter didn't leave us in disabled state
497
497
            shell = null;
498
498
            topLevelSurfaceList = null;
499
499
 
1583
1583
            var stageLoader = findChild(shell, "applicationsDisplayLoader");
1584
1584
            verify(stageLoader);
1585
1585
 
1586
 
            tryCompare(shell, "enabled", true); // enabled by greeter when ready
 
1586
            tryCompare(shell, "waitingOnGreeter", false); // reset by greeter when ready
1587
1587
 
1588
1588
            waitUntilShellIsInOrientation(root.physicalOrientation0);
1589
1589