tst_QAbstractButton::keyNavigation(): QSKIP -> XFAIL
authorJ-P Nurmi <jpnurmi@digia.com>
Wed, 26 Sep 2012 16:14:04 +0000 (18:14 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 27 Sep 2012 16:35:55 +0000 (18:35 +0200)
Task-number: QTBUG-22286
Change-Id: If2c0e9181f2d954f3487dbb4c3f440d26a38adb6
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp

index 6e3e04b..8bfdc77 100644 (file)
@@ -87,7 +87,9 @@ private slots:
     void shortcutEvents();
     void stopRepeatTimer();
 
+#ifdef QT_KEYPAD_NAVIGATION
     void keyNavigation();
+#endif
 
 protected slots:
     void onClicked();
@@ -586,9 +588,10 @@ void tst_QAbstractButton::stopRepeatTimer()
     QCOMPARE(button.timerEventCount(), 0);
 }
 
+#ifdef QT_KEYPAD_NAVIGATION
 void tst_QAbstractButton::keyNavigation()
 {
-    QSKIP("Key navigation in QAbstractButton will be fixed/improved as part of task 194373");
+    QApplication::setNavigationMode(Qt::NavigationModeKeypadDirectional);
 
     QWidget widget;
     QGridLayout *layout = new QGridLayout(&widget);
@@ -636,10 +639,11 @@ void tst_QAbstractButton::keyNavigation()
     buttons[0][1]->hide();
     QTest::keyPress(buttons[0][2], Qt::Key_Left);
     QTest::qWait(100);
+    QTest::keyPress(buttons[0][2], Qt::Key_Left);
+    QEXPECT_FAIL("", "QTBUG-22286" ,Abort);
     QVERIFY(buttons[0][0]->hasFocus());
-
-
 }
+#endif
 
 QTEST_MAIN(tst_QAbstractButton)
 #include "tst_qabstractbutton.moc"