@@ -163,10 +163,13 @@ private Q_SLOTS:
163 QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
163 QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
164 greeter->authenticate("no-password");
164 greeter->authenticate("no-password");
166− // once for user, once for locked; second will be for locked mode
166+ // Two property changed signals will be emitted, one for the IsLocked
167+ // property, one for the ActiveEntry; the first will be IsLocked.
167− while (spy.count() != 2) {
169+ if (spy.count() < 2) {
168 spy.wait();
170 spy.wait();
172+ QCOMPARE(spy.count(), 2);
171 QList<QVariant> arguments = spy.takeLast();
174 QList<QVariant> arguments = spy.takeLast();
172 QVERIFY(arguments.at(0).toString() == "com.canonical.UnityGreeter.List");
175 QVERIFY(arguments.at(0).toString() == "com.canonical.UnityGreeter.List");