summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp')
-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"