diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-07-22 06:15:10 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-07-22 06:17:13 (GMT) |
commit | 7f4378699182be721382555f58b518bd40e7647d (patch) | |
tree | b75f289c6fc0fd0add0f0fe65c224c2cd94bb169 | |
parent | 16cafa618c31db1cb3594767701751c489ce88b9 (diff) | |
download | Qt-7f4378699182be721382555f58b518bd40e7647d.zip Qt-7f4378699182be721382555f58b518bd40e7647d.tar.gz Qt-7f4378699182be721382555f58b518bd40e7647d.tar.bz2 |
Fix TextInput echoMode autotest on Linux
Task-number:
Reviewed-by: Michael Brasser
-rw-r--r-- | tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index e5e495e..6e15a4a 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -802,6 +802,9 @@ void tst_qdeclarativetextinput::echoMode() QDeclarativeView *canvas = createView(SRCDIR "/data/echoMode.qml"); canvas->show(); canvas->setFocus(); + QApplication::setActiveWindow(canvas); + QTest::qWaitForWindowShown(canvas); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas)); QVERIFY(canvas->rootObject() != 0); @@ -849,6 +852,7 @@ void tst_qdeclarativetextinput::echoMode() QCOMPARE(input->text(), QLatin1String("a")); QCOMPARE(input->displayText(), QLatin1String("a")); input->setFocus(false); + QVERIFY(input->hasActiveFocus() == false); QCOMPARE(input->displayText(), QLatin1String("Q")); } |