summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-31 13:09:24 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-31 13:09:24 (GMT)
commit0373325dd1390682922dd07614214c453d473ce3 (patch)
tree93267c9f7d2bdd9e387dc5cda34cd6c548cf8e5c /tests/auto
parentb85a41ece042bca5c4e1ac2a6549f2cdc2c6ca1a (diff)
parentd401f416478628ce84afd2cd755f8df91edee22d (diff)
downloadQt-0373325dd1390682922dd07614214c453d473ce3.zip
Qt-0373325dd1390682922dd07614214c453d473ce3.tar.gz
Qt-0373325dd1390682922dd07614214c453d473ce3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (21 commits) Fix bug when adding import paths manually Update Comment Optimize QDeclarativeEngine::importExtension QGraphicsEffect : Don't rely on the exposedArea when rendering the item into the cache. Fix snapping in listview. Minor cleanup. Improve flipable example. Minor cleanup for visual test framework. VisibleArea is not a creatable type. More testing. Test openUrlExternally doc example of WebView onAlert, and of popups in general. Update examples/declarative.pro Update mouseX(Y) when clicking on a mouse area Declarative examples cleanup. Add test. doc Move gitignore to right level, update for Linux. Cleanup MouseArea visual tests. ...
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml44
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp39
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml20
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp36
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp26
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.0.png)bin1563 -> 1563 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.1.png)bin1570 -> 1570 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.2.png)bin1553 -> 1553 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.3.png)bin1563 -> 1563 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.4.png)bin1569 -> 1569 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.5.png)bin1569 -> 1569 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.6.png)bin1566 -> 1566 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.7.png)bin1566 -> 1566 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.8.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.8.png)bin1567 -> 1567 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.0.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.0.png)bin471 -> 471 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.1.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.1.png)bin474 -> 474 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.10.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.10.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.11.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.11.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.12.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.12.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.13.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.13.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.14.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.14.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.15.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.15.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.16.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.16.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.17.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.17.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.18.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.18.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.19.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.19.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.2.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.2.png)bin474 -> 474 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.20.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.20.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.21.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.21.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.22.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.22.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.3.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.3.png)bin474 -> 474 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.4.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.4.png)bin481 -> 481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.5.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.5.png)bin481 -> 481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.6.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.6.png)bin481 -> 481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.7.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.7.png)bin481 -> 481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.8.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.8.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.9.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.9.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/drag.qml)5
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/mouseregion.qml)11
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp6
44 files changed, 191 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
new file mode 100644
index 0000000..2fec9da
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
@@ -0,0 +1,44 @@
+import Qt 4.6
+
+QtObject {
+ //real
+ property real test1: a + b
+ property real test2: a - b
+ property bool test3: (a < b)
+ property bool test4: (a > b)
+ property bool test5: (a == b)
+ property bool test6: (a != b)
+
+ //int
+ property int test7: c + d
+ property int test8: d - c
+ property bool test9: (c < d)
+ property bool test10: (c > d)
+ property bool test11: (c == d)
+ property bool test12: (c != d)
+
+ //string
+ property string test13: e + f
+ property string test14: e + " " + f
+ property bool test15: (e == f)
+ property bool test16: (e != f)
+
+ //type conversion
+ property int test17: a
+ property real test18: d
+ property int test19: g
+ property real test20: g
+ property string test21: g
+ property string test22: h
+ property bool test23: i
+
+ property real a: 4.5
+ property real b: 11.2
+ property int c: 9
+ property int d: 176
+ property string e: "Hello"
+ property string f: "World"
+ property var g: 6.7
+ property var h: "!"
+ property var i: true
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index b218d30..77dd4b8 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -129,6 +129,7 @@ private slots:
void ownership();
void qlistqobjectMethods();
void strictlyEquals();
+ void compiled();
void bug1();
void dynamicCreationCrash();
@@ -2026,6 +2027,44 @@ void tst_qdeclarativeecmascript::strictlyEquals()
delete object;
}
+void tst_qdeclarativeecmascript::compiled()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("compiled.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toReal(), qreal(15.7));
+ QCOMPARE(object->property("test2").toReal(), qreal(-6.7));
+ QCOMPARE(object->property("test3").toBool(), true);
+ QCOMPARE(object->property("test4").toBool(), false);
+ QCOMPARE(object->property("test5").toBool(), false);
+ QCOMPARE(object->property("test6").toBool(), true);
+
+ QCOMPARE(object->property("test7").toInt(), 185);
+ QCOMPARE(object->property("test8").toInt(), 167);
+ QCOMPARE(object->property("test9").toBool(), true);
+ QCOMPARE(object->property("test10").toBool(), false);
+ QCOMPARE(object->property("test11").toBool(), false);
+ QCOMPARE(object->property("test12").toBool(), true);
+
+ QCOMPARE(object->property("test13").toString(), QLatin1String("HelloWorld"));
+ QCOMPARE(object->property("test14").toString(), QLatin1String("Hello World"));
+ QCOMPARE(object->property("test15").toBool(), false);
+ QCOMPARE(object->property("test16").toBool(), true);
+
+ QCOMPARE(object->property("test17").toInt(), 4);
+ QCOMPARE(object->property("test18").toReal(), qreal(176));
+ QEXPECT_FAIL("", "QTBUG-9538", Continue);
+ QCOMPARE(object->property("test19").toInt(), 6);
+ QCOMPARE(object->property("test20").toReal(), qreal(6.7));
+ QCOMPARE(object->property("test21").toString(), QLatin1String("6.7"));
+ QCOMPARE(object->property("test22").toString(), QLatin1String("!"));
+ QCOMPARE(object->property("test23").toBool(), true);
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp b/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
index 879047e..412c3b7 100644
--- a/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
+++ b/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
@@ -130,7 +130,7 @@ void tst_QDeclarativeLayouts::test_qml()
void tst_QDeclarativeLayouts::test_cpp()
{
- //TODO: Waiting on QT-2407 to write this test
+ //TODO: This test!
}
QDeclarativeView *tst_QDeclarativeLayouts::createView(const QString &filename)
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
new file mode 100644
index 0000000..0da7c45
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Rectangle {
+ color: "#ffffff"
+ width: 320; height: 240
+ MouseArea {
+ id: mouseRegion
+ objectName: "mouseregion"
+ anchors.fill: parent
+ Rectangle {
+ id: ball
+ objectName: "ball"
+ width: 20; height: 20
+ radius: 10
+ color: "#0000ff"
+ x: { mouseRegion.mouseX }
+ y: mouseRegion.mouseY
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index 769cf32..9b664e5 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -42,6 +42,7 @@
#include <QtTest/QtTest>
#include <QtTest/QSignalSpy>
#include <private/qdeclarativemousearea_p.h>
+#include <private/qdeclarativerectangle_p.h>
#include <QtDeclarative/qdeclarativeview.h>
class tst_QDeclarativeMouseArea: public QObject
@@ -49,6 +50,7 @@ class tst_QDeclarativeMouseArea: public QObject
Q_OBJECT
private slots:
void dragProperties();
+ void updateMouseAreaPosOnClick();
private:
QDeclarativeView *createView(const QString &filename);
};
@@ -121,6 +123,8 @@ void tst_QDeclarativeMouseArea::dragProperties()
QCOMPARE(xmaxSpy.count(),1);
QCOMPARE(yminSpy.count(),1);
QCOMPARE(ymaxSpy.count(),1);
+
+ delete canvas;
}
QDeclarativeView *tst_QDeclarativeMouseArea::createView(const QString &filename)
@@ -133,6 +137,38 @@ QDeclarativeView *tst_QDeclarativeMouseArea::createView(const QString &filename)
return canvas;
}
+void tst_QDeclarativeMouseArea::updateMouseAreaPosOnClick()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/updateMousePosOnClick.qml");
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeMouseArea *mouseRegion = canvas->rootObject()->findChild<QDeclarativeMouseArea*>("mouseregion");
+ QVERIFY(mouseRegion != 0);
+
+ QDeclarativeRectangle *rect = canvas->rootObject()->findChild<QDeclarativeRectangle*>("ball");
+ QVERIFY(rect != 0);
+
+ QCOMPARE(mouseRegion->mouseX(), rect->x());
+ QCOMPARE(mouseRegion->mouseY(), rect->y());
+
+ QGraphicsScene *scene = canvas->scene();
+ QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
+ event.setScenePos(QPointF(100, 100));
+ event.setButton(Qt::LeftButton);
+ event.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &event);
+
+ QCOMPARE(mouseRegion->mouseX(), 100.0);
+ QCOMPARE(mouseRegion->mouseY(), 100.0);
+
+ QCOMPARE(mouseRegion->mouseX(), rect->x());
+ QCOMPARE(mouseRegion->mouseY(), rect->y());
+
+ delete canvas;
+}
+
QTEST_MAIN(tst_QDeclarativeMouseArea)
#include "tst_qdeclarativemousearea.moc"
diff --git a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml b/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml
new file mode 100644
index 0000000..70bd74d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ Component.onCompleted: Qt.openUrlExternally("test:url")
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 4987557..48d5235 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -44,6 +44,7 @@
#include <QDeclarativeEngine>
#include <QFileInfo>
#include <QDeclarativeComponent>
+#include <QDesktopServices>
#include <QDir>
#include <QVector3D>
#include <QCryptographicHash>
@@ -261,10 +262,31 @@ void tst_qdeclarativeqt::tint()
delete object;
}
+class MyUrlHandler : public QObject
+{
+ Q_OBJECT
+public:
+ MyUrlHandler() : called(0) { }
+ int called;
+ QUrl last;
+
+public slots:
+ void noteCall(const QUrl &url) { called++; last = url; }
+};
+
void tst_qdeclarativeqt::openUrlExternally()
{
- QEXPECT_FAIL("", "How do we test this?", Abort);
- QVERIFY(false);
+ MyUrlHandler handler;
+
+ QDesktopServices::setUrlHandler("test", &handler, "noteCall");
+
+ QDeclarativeComponent component(&engine, TEST_FILE("openUrlExternally.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(handler.called,1);
+ QCOMPARE(handler.last, QUrl("test:url"));
+
+ QDesktopServices::unsetUrlHandler("test");
}
void tst_qdeclarativeqt::md5()
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.0.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png
index cf36d60..cf36d60 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.1.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png
index 6069df8..6069df8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.2.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png
index b8bd5f3..b8bd5f3 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.3.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png
index cf36d60..cf36d60 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.4.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png
index 831d6b4..831d6b4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.5.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png
index f7079dc..f7079dc 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.6.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png
index a5f4451..a5f4451 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.7.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png
index e1261d0..e1261d0 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.8.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.8.png
index 653905e..653905e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.8.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.8.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
index 5a131e9..5a131e9 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml
index cc374fd..cc374fd 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.0.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.0.png
index c249c21..c249c21 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.1.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.1.png
index a96bf1b..a96bf1b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.10.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.10.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.10.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.10.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.11.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.11.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.11.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.11.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.12.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.12.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.12.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.12.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.13.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.13.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.13.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.13.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.14.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.14.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.14.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.14.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.15.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.15.png
index e797cc9..e797cc9 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.15.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.15.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.16.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.16.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.16.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.16.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.17.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.17.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.17.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.17.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.18.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.18.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.18.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.18.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.19.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.19.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.19.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.19.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.2.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.2.png
index a96bf1b..a96bf1b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.20.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.20.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.20.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.20.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.21.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.21.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.21.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.21.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.22.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.22.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.22.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.22.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.3.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.3.png
index a96bf1b..a96bf1b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.4.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.4.png
index 1fe365a..1fe365a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.5.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.5.png
index 1fe365a..1fe365a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.6.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.6.png
index 1fe365a..1fe365a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.7.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.7.png
index 1fe365a..1fe365a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.8.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.8.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.8.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.8.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.9.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.9.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.9.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.9.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/drag.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
index dbb2a24..21c46d8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/drag.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
@@ -1,5 +1,10 @@
import Qt 4.6
+/*
+this test shows a blue box being dragged around -- first roughly tracing the
+borders of the window, then doing a rough 'x'-shape, then moving to around the middle.
+*/
+
Rectangle{
width:400
height:440
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/mouseregion.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml
index 3c722d0..3019006 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/mouseregion.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml
@@ -1,5 +1,16 @@
import Qt 4.6
+/*
+This test displays 6 red rects -- 4 in the top row, 2 in the bottom.
+
+Sequence:
+1. the bottom-left rect turns blue, then green
+2. the second rect in the top row turns blue
+3. the third rect in the top row turns blue
+4. the last rect in the top row quickly turns blue then back to red
+5. the bottom-left rect turns blue, then green
+*/
+
Rectangle {
id: root
width: 400
diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
index 2794ab8..91f8486 100644
--- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
+++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
@@ -101,6 +101,8 @@ void tst_qmlvisual::visual_data()
files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR));
else {
//these are tests we think are stable and useful enough to be run by the CI system
+ files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/mousearea-visual.qml";
+ files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/drag.qml";
files << QT_TEST_SOURCE_DIR "/animation/pauseAnimation/pauseAnimation-visual.qml";
files << QT_TEST_SOURCE_DIR "/animation/parentAnimation/parentAnimation-visual.qml";
files << QT_TEST_SOURCE_DIR "/animation/reanchor/reanchor.qml";
@@ -124,6 +126,10 @@ void tst_qmlvisual::visual()
arguments << "-script" << testdata
<< "-scriptopts" << "play,testimages,testerror,exitoncomplete,exitonfailure"
<< file << "-graphicssystem" << "raster";
+#ifdef Q_WS_QWS
+ arguments << "-qws";
+#endif
+
QProcess p;
p.start(qmlruntime, arguments);
QVERIFY(p.waitForFinished());