aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp18
-rw-r--r--tests/auto/declarative/qjsengine/tst_qjsengine.cpp4
-rw-r--r--tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp2
-rw-r--r--tests/auto/declarative/qquickitem/tst_qquickitem.cpp5
-rw-r--r--tests/auto/declarative/qquicktext/tst_qquicktext.cpp13
-rw-r--r--tests/auto/declarative/qquicktextedit/tst_qquicktextedit.cpp10
-rw-r--r--tests/auto/declarative/qquicktextinput/tst_qquicktextinput.cpp21
7 files changed, 24 insertions, 49 deletions
diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
index db345e38fd..72313ab054 100644
--- a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
+++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
@@ -67,8 +67,6 @@ tst_qdeclarativeapplication::tst_qdeclarativeapplication()
void tst_qdeclarativeapplication::active()
{
- QSKIP("QTBUG-21573");
-
QDeclarativeComponent component(&engine);
component.setData("import QtQuick 2.0; Item { property bool active: Qt.application.active }", QUrl::fromLocalFile(""));
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
@@ -84,23 +82,28 @@ void tst_qdeclarativeapplication::active()
view.show();
view.requestActivateWindow();
QTest::qWait(50);
+ QEXPECT_FAIL("", "QTBUG-21573", Abort);
QTRY_COMPARE(view.status(), QQuickView::Ready);
QCOMPARE(item->property("active").toBool(), QGuiApplication::activeWindow() != 0);
- // not active again
+#if 0
+ // QGuiApplication has no equivalent of setActiveWindow(0). QTBUG-21573
+ // Is this different to clearing the active state of the window or can it be removed?
+ // On Mac, setActiveWindow(0) on mac does not deactivate the current application,
+ // must switch to a different app or hide the current app to trigger this
// on mac, setActiveWindow(0) on mac does not deactivate the current application
// (you have to switch to a different app or hide the current app to trigger this)
-#if !defined(Q_WS_MAC)
-// QTBUG-21573
-// QGuiApplication::setActiveWindow(0);
+
+ // not active again
+ QGuiApplication::setActiveWindow(0);
QVERIFY(!item->property("active").toBool());
QCOMPARE(item->property("active").toBool(), QGuiApplication::activeWindow() != 0);
#endif
+
}
void tst_qdeclarativeapplication::layoutDirection()
{
- QSKIP("QTBUG-21573");
QDeclarativeComponent component(&engine);
component.setData("import QtQuick 2.0; Item { property bool layoutDirection: Qt.application.layoutDirection }", QUrl::fromLocalFile(""));
@@ -114,6 +117,7 @@ void tst_qdeclarativeapplication::layoutDirection()
// mirrored
QGuiApplication::setLayoutDirection(Qt::RightToLeft);
+ QEXPECT_FAIL("", "QTBUG-21573", Abort);
QCOMPARE(Qt::LayoutDirection(item->property("layoutDirection").toInt()), Qt::RightToLeft);
// not mirrored again
diff --git a/tests/auto/declarative/qjsengine/tst_qjsengine.cpp b/tests/auto/declarative/qjsengine/tst_qjsengine.cpp
index f83a1b3efd..35b4fe4ce7 100644
--- a/tests/auto/declarative/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/declarative/qjsengine/tst_qjsengine.cpp
@@ -929,13 +929,11 @@ void tst_QJSEngine::jsParseDate()
}
// Date.parse() should be able to parse the output of Date().toString()
-#ifndef Q_WS_WIN // TODO: Test and remove this since 169701 has been fixed
{
QJSValue ret = eng.evaluate("var x = new Date(); var s = x.toString(); s == new Date(Date.parse(s)).toString()");
QVERIFY(ret.isBoolean());
QCOMPARE(ret.toBoolean(), true);
}
-#endif
}
void tst_QJSEngine::newQObject()
@@ -1073,7 +1071,7 @@ void tst_QJSEngine::newQObject_promoteObject()
void tst_QJSEngine::newQObject_sameQObject()
{
#if 0 // ###FIXME: No QObjectWrapOptions API
- QSKIP("This test stongly relay on strictlyEquals feature that would change in near future");
+ QSKIP("This test strongly relies on strictlyEquals feature that would change in near future");
QScriptEngine eng;
// calling newQObject() several times with same object
for (int x = 0; x < 2; ++x) {
diff --git a/tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp b/tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp
index 2f155e298e..a02db06616 100644
--- a/tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp
@@ -533,7 +533,7 @@ void tst_qquickflickable::disabled()
void tst_qquickflickable::flickVelocity()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("Producing flicks on Mac CI impossible due to timing problems");
#endif
diff --git a/tests/auto/declarative/qquickitem/tst_qquickitem.cpp b/tests/auto/declarative/qquickitem/tst_qquickitem.cpp
index 35346c8236..a5f908ce86 100644
--- a/tests/auto/declarative/qquickitem/tst_qquickitem.cpp
+++ b/tests/auto/declarative/qquickitem/tst_qquickitem.cpp
@@ -137,11 +137,6 @@ private:
w->show();
w->requestActivateWindow();
qApp->processEvents();
-
-#ifdef Q_WS_X11
- // to be safe and avoid failing setFocus with window managers
- qt_x11_wait_for_window_manager(w);
-#endif
}
};
diff --git a/tests/auto/declarative/qquicktext/tst_qquicktext.cpp b/tests/auto/declarative/qquicktext/tst_qquicktext.cpp
index 3a08dd208d..8ac3a078bc 100644
--- a/tests/auto/declarative/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/declarative/qquicktext/tst_qquicktext.cpp
@@ -520,15 +520,7 @@ void tst_qquicktext::alignments()
QFETCH(int, vAlign);
QFETCH(QString, expectfile);
-#ifdef Q_WS_X11
- // Font-specific, but not likely platform-specific, so only test on one platform
- QFont fn;
- fn.setRawName("-misc-fixed-medium-r-*-*-8-*-*-*-*-*-*-*");
- QApplication::setFont(fn);
-#endif
-
QQuickView *canvas = createView(TESTDATA("alignments.qml"));
-
canvas->show();
canvas->requestActivateWindow();
QTest::qWait(50);
@@ -545,14 +537,9 @@ void tst_qquicktext::alignments()
canvas->render(&p);
QImage expect(expectfile);
-
-#ifdef Q_WS_X11
- // Font-specific, but not likely platform-specific, so only test on one platform
if (QApplicationPrivate::graphics_system_name == "raster" || QApplicationPrivate::graphics_system_name == "") {
QCOMPARE(actual,expect);
}
-#endif
-
delete canvas;
#endif
}
diff --git a/tests/auto/declarative/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/declarative/qquicktextedit/tst_qquicktextedit.cpp
index 86c33a64d8..bcc1a4c5d7 100644
--- a/tests/auto/declarative/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/declarative/qquicktextedit/tst_qquicktextedit.cpp
@@ -63,7 +63,7 @@
#include <private/qtextcontrol_p.h>
#include "../shared/util.h"
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Carbon/Carbon.h>
#endif
@@ -1780,7 +1780,7 @@ void tst_qquicktextedit::navigation()
void tst_qquicktextedit::copyAndPaste() {
#ifndef QT_NO_CLIPBOARD
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
{
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
@@ -2207,9 +2207,7 @@ void tst_qquicktextedit::preeditMicroFocus()
ic.sendPreeditText(preeditText, 0);
currentRect = edit->inputMethodQuery(Qt::ImCursorRectangle).toRect();
QCOMPARE(currentRect, previousRect);
-#if defined(Q_WS_X11) || defined(Q_WS_QWS)
QCOMPARE(ic.updateReceived, false); // The cursor position hasn't changed.
-#endif
QCOMPARE(cursorRectangleSpy.count(), 0);
// Verify that the micro focus rect moves to the left as the cursor position
@@ -2219,9 +2217,7 @@ void tst_qquicktextedit::preeditMicroFocus()
ic.sendPreeditText(preeditText, i);
currentRect = edit->inputMethodQuery(Qt::ImCursorRectangle).toRect();
QVERIFY(previousRect.left() < currentRect.left());
-#if defined(Q_WS_X11) || defined(Q_WS_QWS)
QCOMPARE(ic.updateReceived, true);
-#endif
QVERIFY(cursorRectangleSpy.count() > 0);
cursorRectangleSpy.clear();
previousRect = currentRect;
@@ -2234,9 +2230,7 @@ void tst_qquicktextedit::preeditMicroFocus()
ic.sendEvent(QInputMethodEvent(preeditText, QList<QInputMethodEvent::Attribute>()));
currentRect = edit->inputMethodQuery(Qt::ImCursorRectangle).toRect();
QCOMPARE(currentRect, previousRect);
-#if defined(Q_WS_X11) || defined(Q_WS_QWS)
QCOMPARE(ic.updateReceived, true);
-#endif
QVERIFY(cursorRectangleSpy.count() > 0);
#endif
}
diff --git a/tests/auto/declarative/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/declarative/qquicktextinput/tst_qquicktextinput.cpp
index 23224d0452..7e381480cf 100644
--- a/tests/auto/declarative/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/declarative/qquicktextinput/tst_qquicktextinput.cpp
@@ -1164,9 +1164,11 @@ void tst_qquicktextinput::horizontalAlignment_RightToLeft()
{ QInputMethodEvent ev("Hello world!", QList<QInputMethodEvent::Attribute>()); QGuiApplication::sendEvent(&canvas, &ev); }
QCOMPARE(textInput->hAlign(), QQuickTextInput::AlignLeft);
-#ifndef Q_OS_MAC // QTBUG-18040
+#ifdef Q_OS_MAC
// empty text with implicit alignment follows the system locale-based
// keyboard input direction from QGuiApplication::keyboardInputDirection
+ QEXPECT_FAIL("", "QTBUG-18040", Abort);
+#endif
textInput->setText("");
QCOMPARE(textInput->hAlign(), QGuiApplication::keyboardInputDirection() == Qt::LeftToRight ?
QQuickTextInput::AlignLeft : QQuickTextInput::AlignRight);
@@ -1177,10 +1179,11 @@ void tst_qquicktextinput::horizontalAlignment_RightToLeft()
textInput->setHAlign(QQuickTextInput::AlignRight);
QCOMPARE(textInput->hAlign(), QQuickTextInput::AlignRight);
QVERIFY(-textInputPrivate->hscroll > canvas.width()/2);
-#endif
-#ifndef Q_OS_MAC // QTBUG-18040
- // alignment of TextInput with no text set to it
+
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-18040", Abort); // alignment of TextInput with no text set to it
+#endif
QString componentStr = "import QtQuick 2.0\nTextInput {}";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -1188,7 +1191,6 @@ void tst_qquicktextinput::horizontalAlignment_RightToLeft()
QCOMPARE(textObject->hAlign(), QGuiApplication::keyboardInputDirection() == Qt::LeftToRight ?
QQuickTextInput::AlignLeft : QQuickTextInput::AlignRight);
delete textObject;
-#endif
}
void tst_qquicktextinput::positionAt()
@@ -1602,7 +1604,7 @@ void tst_qquicktextinput::navigation_RTL()
void tst_qquicktextinput::copyAndPaste() {
#ifndef QT_NO_CLIPBOARD
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
{
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
@@ -2387,9 +2389,7 @@ void tst_qquicktextinput::preeditMicroFocus()
ic.sendPreeditText(preeditText, 0);
currentRect = input->inputMethodQuery(Qt::ImCursorRectangle).toRect();
QCOMPARE(currentRect, previousRect);
-#if defined(Q_WS_X11) || defined(Q_WS_QWS)
QCOMPARE(ic.updateReceived, true);
-#endif
// Verify that the micro focus rect moves to the left as the cursor position
// is incremented.
@@ -2398,9 +2398,8 @@ void tst_qquicktextinput::preeditMicroFocus()
ic.sendPreeditText(preeditText, i);
currentRect = input->inputMethodQuery(Qt::ImCursorRectangle).toRect();
QVERIFY(previousRect.left() < currentRect.left());
-#if defined(Q_WS_X11) || defined(Q_WS_QWS)
+
QCOMPARE(ic.updateReceived, true);
-#endif
previousRect = currentRect;
}
@@ -2411,10 +2410,8 @@ void tst_qquicktextinput::preeditMicroFocus()
ic.sendEvent(QInputMethodEvent(preeditText, QList<QInputMethodEvent::Attribute>()));
currentRect = input->inputMethodQuery(Qt::ImCursorRectangle).toRect();
QCOMPARE(currentRect, previousRect);
-#if defined(Q_WS_X11) || defined(Q_WS_QWS)
QCOMPARE(ic.updateReceived, true);
#endif
-#endif
}
void tst_qquicktextinput::inputContextMouseHandler()