From: Michael Brasser Date: Fri, 6 Jan 2012 05:42:51 +0000 (+1000) Subject: Update text autotests. X-Git-Tag: upstream/5.2.1~2926 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=668fff3b0fc52e081dcab5fc4e76fdfc72f4a5f0;p=platform%2Fupstream%2Fqtdeclarative.git Update text autotests. QTBUG-18040 has been fixed for Qt 5, we no longer need to skip these tests on Mac. Change-Id: Ie1883a75b105ca321388b3c4483110306e2a387c Reviewed-by: Andrew den Exter --- diff --git a/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp b/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp index fad3bce..bb27505 100644 --- a/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp @@ -711,7 +711,6 @@ void tst_qquicktext::horizontalAlignment_RightToLeft() QCOMPARE(text->hAlign(), QQuickText::AlignLeft); QVERIFY(textPrivate->layout.lineAt(0).naturalTextRect().left() < canvas->width()/2); -#ifndef Q_OS_MAC // QTBUG-18040 // empty text with implicit alignment follows the system locale-based // keyboard input direction from QApplication::keyboardInputDirection text->setText(""); @@ -719,11 +718,9 @@ void tst_qquicktext::horizontalAlignment_RightToLeft() QQuickText::AlignLeft : QQuickText::AlignRight); text->setHAlign(QQuickText::AlignRight); QCOMPARE(text->hAlign(), QQuickText::AlignRight); -#endif delete canvas; -#ifndef Q_OS_MAC // QTBUG-18040 // alignment of Text with no text set to it QString componentStr = "import QtQuick 2.0\nText {}"; QDeclarativeComponent textComponent(&engine); @@ -732,7 +729,6 @@ void tst_qquicktext::horizontalAlignment_RightToLeft() QCOMPARE(textObject->hAlign(), QApplication::keyboardInputDirection() == Qt::LeftToRight ? QQuickText::AlignLeft : QQuickText::AlignRight); delete textObject; -#endif } void tst_qquicktext::verticalAlignment() diff --git a/tests/auto/qtquick2/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/qtquick2/qquicktextedit/tst_qquicktextedit.cpp index 1773360..5ea0222 100644 --- a/tests/auto/qtquick2/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/qtquick2/qquicktextedit/tst_qquicktextedit.cpp @@ -713,7 +713,6 @@ void tst_qquicktextedit::hAlign_RightToLeft() // redundant as an actual input method may take care of it. { QInputMethodEvent ev; QGuiApplication::sendEvent(qGuiApp->inputPanel()->inputItem(), &ev); } -#ifndef Q_OS_MAC // QTBUG-18040 // empty text with implicit alignment follows the system locale-based // keyboard input direction from QGuiApplication::keyboardInputDirection textEdit->setText(""); @@ -726,9 +725,7 @@ void tst_qquicktextedit::hAlign_RightToLeft() textEdit->setHAlign(QQuickTextEdit::AlignRight); QCOMPARE(textEdit->hAlign(), QQuickTextEdit::AlignRight); QVERIFY(textEdit->positionToRectangle(0).x() > canvas.width()/2); -#endif -#ifndef Q_OS_MAC // QTBUG-18040 // alignment of TextEdit with no text set to it QString componentStr = "import QtQuick 2.0\nTextEdit {}"; QDeclarativeComponent textComponent(&engine); @@ -737,7 +734,6 @@ void tst_qquicktextedit::hAlign_RightToLeft() QCOMPARE(textObject->hAlign(), QGuiApplication::keyboardInputDirection() == Qt::LeftToRight ? QQuickTextEdit::AlignLeft : QQuickTextEdit::AlignRight); delete textObject; -#endif } void tst_qquicktextedit::vAlign()