summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles/qmacstyle
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2013-07-10 14:20:37 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-11 10:56:49 +0200
commit5ec3b2826b3f4c80adc3ed8f5aa290e6c1a2f2ec (patch)
treeae7aa2056675fdc80b36cf392d030ee2e350db05 /tests/auto/widgets/styles/qmacstyle
parenteb5749e8d9e873ac5aec2ba042d7a04b894f1421 (diff)
Test password mask delay and characters on Mac.
Task-number: QTBUG-31498 Change-Id: Iab4a56b94364e3db78070aca40c629f9398ffbb7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'tests/auto/widgets/styles/qmacstyle')
-rw-r--r--tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
index 7925820b70..e942f13562 100644
--- a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
+++ b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
@@ -87,6 +87,7 @@ private slots:
void layoutSpacings();
void smallMiniNormalExclusivity_data();
void smallMiniNormalExclusivity();
+ void passwordCharacter();
private:
static QSize msh(QWidget *widget);
@@ -405,6 +406,17 @@ void tst_QMacStyle::smallMiniNormalExclusivity()
}
}
+void tst_QMacStyle::passwordCharacter()
+{
+ QLineEdit lineEdit;
+ lineEdit.setEchoMode(QLineEdit::Password);
+ QTest::keyClick(&lineEdit, Qt::Key_P);
+ // Should be no password delay; text should instantly be masked.
+ const QChar bullet(0x2022);
+ const QString expected(1, bullet);
+ QCOMPARE(lineEdit.displayText(), expected);
+}
+
QTEST_MAIN(tst_QMacStyle)
#include "tst_qmacstyle.moc"