summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-05 17:22:10 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-05 17:22:10 (GMT)
commitd801a997abbea01eade4155f5e7a0d51437ba1d9 (patch)
treec22649a54741783cb4b74f32922e60ca657c34d1 /tests/auto
parentc6ac9fe2e8d219bb9694efaf5b25ec5108fb8fa6 (diff)
parent5de63109f548eee20df1fcf8b705b3471b005238 (diff)
downloadQt-d801a997abbea01eade4155f5e7a0d51437ba1d9.zip
Qt-d801a997abbea01eade4155f5e7a0d51437ba1d9.tar.gz
Qt-d801a997abbea01eade4155f5e7a0d51437ba1d9.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: (25 commits) optimize dynamic call-by-name away Add support for QtScript connect/disconnect syntax in QML Minor perf improvement when running QML script blocks Fix qdeclarative{audio,video} tests. Don't assume documents are in UTF-8. Add basic support for explicit newParent in ParentAnimation. Delete uninspiring example. Fix compiler warning on RVCT Use new enum syntax for value types. Expect fail in currentIndex test for now. Allow unquoted enum syntax for value types More declarative examples cleanup. Improve declarative tabs example. Fix test leaks Use _data() for some tests Add missing NOTIFYs to timer, xmllistmodel, xmlrole Document new ParentChange properties. declarative examples cleanup Fix test Update QmlChanges.txt ...
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/declarative.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/rotation.qml48
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp58
-rw-r--r--tests/auto/declarative/qdeclarativedatetimeformatter/qdeclarativedatetimeformatter.pro5
-rw-r--r--tests/auto/declarative/qdeclarativedatetimeformatter/tst_qdeclarativedatetimeformatter.cpp150
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml16
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml22
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml18
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml19
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml19
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp162
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml43
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp66
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp1
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp46
-rw-r--r--tests/auto/declarative/qdeclarativenumberformatter/qdeclarativenumberformatter.pro5
-rw-r--r--tests/auto/declarative/qdeclarativenumberformatter/tst_qdeclarativenumberformatter.cpp224
-rw-r--r--tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp37
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp20
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml28
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xmlbin0 -> 154 bytes
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp548
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml10
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp88
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.0.pngbin0 -> 3742 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.1.pngbin0 -> 3727 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.2.pngbin0 -> 3742 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.3.pngbin0 -> 3628 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.4.pngbin0 -> 3610 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.5.pngbin0 -> 3742 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.qml1663
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/parentAnimation.qml58
-rw-r--r--tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro12
-rw-r--r--tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp2
-rw-r--r--tests/auto/qdeclarativevideo/qdeclarativevideo.pro12
-rw-r--r--tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp2
48 files changed, 2680 insertions, 808 deletions
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 99a32d9..143fbad 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -10,7 +10,6 @@ SUBDIRS += \
qdeclarativecomponent \ # Cover
qdeclarativeconnection \ # Cover
qdeclarativecontext \ # Cover
- qdeclarativedatetimeformatter \ # Cover
qdeclarativedebug \ # Cover
qdeclarativedebugclient \ # Cover
qdeclarativedebugservice \ # Cover
@@ -45,7 +44,6 @@ SUBDIRS += \
qdeclarativeproperty \ # Cover
qdeclarativemetatype \ # Cover
qdeclarativemoduleplugin \ # Cover
- qdeclarativenumberformatter \ # Cover
qdeclarativepixmapcache \ # Cover
qdeclarativepropertymap \ # Cover
qdeclarativeqt \ # Cover
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml b/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml
new file mode 100644
index 0000000..e9c57d4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml
@@ -0,0 +1,48 @@
+import Qt 4.6
+
+Rectangle {
+ width: 600; height: 200
+
+ Row {
+ spacing: 5
+ Rectangle {
+ id: rr
+ objectName: "rr"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr2
+ objectName: "rr2"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr3
+ objectName: "rr3"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr4
+ objectName: "rr4"
+ color: "red"
+ width: 100; height: 100
+ }
+ }
+
+ states: State {
+ name: "state1"
+ PropertyChanges { target: rr; rotation: 370 }
+ PropertyChanges { target: rr2; rotation: 370 }
+ PropertyChanges { target: rr3; rotation: 370 }
+ PropertyChanges { target: rr4; rotation: 370 }
+ }
+
+ transitions: Transition {
+ RotationAnimation { target: rr; direction: RotationAnimation.Numerical; duration: 1000 }
+ RotationAnimation { target: rr2; direction: RotationAnimation.Clockwise; duration: 1000 }
+ RotationAnimation { target: rr3; direction: RotationAnimation.Counterclockwise; duration: 1000 }
+ RotationAnimation { target: rr4; direction: RotationAnimation.Shortest; duration: 1000 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index f5e15fb..076afea 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -59,6 +59,7 @@ private slots:
void simpleProperty();
void simpleNumber();
void simpleColor();
+ void simpleRotation();
void alwaysRunToEnd();
void complete();
void resume();
@@ -73,6 +74,7 @@ private slots:
void propertyValueSourceDefaultStart();
void dontStart();
void easingProperties();
+ void rotation();
};
#define QTIMED_COMPARE(lhs, rhs) do { \
@@ -168,6 +170,32 @@ void tst_qdeclarativeanimations::simpleColor()
QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1));
}
+void tst_qdeclarativeanimations::simpleRotation()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativeRotationAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("rotation");
+ animation.setTo(270);
+ QVERIFY(animation.target() == &rect);
+ QVERIFY(animation.property() == "rotation");
+ QVERIFY(animation.to() == 270);
+ QVERIFY(animation.direction() == QDeclarativeRotationAnimation::Shortest);
+ animation.start();
+ QVERIFY(animation.isRunning());
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.rotation(), qreal(270));
+
+ rect.setRotation(0);
+ animation.start();
+ animation.pause();
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
+ animation.setCurrentTime(125);
+ QVERIFY(animation.currentTime() == 125);
+ QCOMPARE(rect.rotation(), qreal(-45));
+}
+
void tst_qdeclarativeanimations::alwaysRunToEnd()
{
QDeclarativeRectangle rect;
@@ -667,6 +695,36 @@ void tst_qdeclarativeanimations::easingProperties()
}
}
+void tst_qdeclarativeanimations::rotation()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/rotation.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *rr = rect->findChild<QDeclarativeRectangle*>("rr");
+ QDeclarativeRectangle *rr2 = rect->findChild<QDeclarativeRectangle*>("rr2");
+ QDeclarativeRectangle *rr3 = rect->findChild<QDeclarativeRectangle*>("rr3");
+ QDeclarativeRectangle *rr4 = rect->findChild<QDeclarativeRectangle*>("rr4");
+
+ rect->setState("state1");
+ QTest::qWait(800);
+ qreal r1 = rr->rotation();
+ qreal r2 = rr2->rotation();
+ qreal r3 = rr3->rotation();
+ qreal r4 = rr4->rotation();
+
+ QVERIFY(r1 > qreal(0) && r1 < qreal(370));
+ QVERIFY(r2 > qreal(0) && r2 < qreal(370));
+ QVERIFY(r3 < qreal(0) && r3 > qreal(-350));
+ QVERIFY(r4 > qreal(0) && r4 < qreal(10));
+ QCOMPARE(r1,r2);
+ QVERIFY(r4 < r2);
+
+ QTest::qWait(800);
+ QTIMED_COMPARE(rr->rotation() + rr2->rotation() + rr3->rotation() + rr4->rotation(), qreal(370*4));
+}
+
QTEST_MAIN(tst_qdeclarativeanimations)
#include "tst_qdeclarativeanimations.moc"
diff --git a/tests/auto/declarative/qdeclarativedatetimeformatter/qdeclarativedatetimeformatter.pro b/tests/auto/declarative/qdeclarativedatetimeformatter/qdeclarativedatetimeformatter.pro
deleted file mode 100644
index 22f53e6..0000000
--- a/tests/auto/declarative/qdeclarativedatetimeformatter/qdeclarativedatetimeformatter.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative
-macx:CONFIG -= app_bundle
-
-SOURCES += tst_qdeclarativedatetimeformatter.cpp
diff --git a/tests/auto/declarative/qdeclarativedatetimeformatter/tst_qdeclarativedatetimeformatter.cpp b/tests/auto/declarative/qdeclarativedatetimeformatter/tst_qdeclarativedatetimeformatter.cpp
deleted file mode 100644
index 69d7900..0000000
--- a/tests/auto/declarative/qdeclarativedatetimeformatter/tst_qdeclarativedatetimeformatter.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qtest.h>
-#include <QtDeclarative/qdeclarativeengine.h>
-#include <QtDeclarative/qdeclarativecomponent.h>
-#include <private/qdeclarativedatetimeformatter_p.h>
-#include <QDebug>
-
-class tst_qdeclarativedatetimeformatter : public QObject
-{
- Q_OBJECT
-public:
- tst_qdeclarativedatetimeformatter() {}
-
-private slots:
- void date();
- void time();
- void dateTime();
-};
-
-void tst_qdeclarativedatetimeformatter::date()
-{
- QDeclarativeEngine engine;
- QDeclarativeComponent formatterComponent(&engine);
- formatterComponent.setData(QByteArray("import Qt 4.6\n DateTimeFormatter { date: \"2008-12-24\" }"),
- QUrl::fromLocalFile(""));
- QDeclarativeDateTimeFormatter *formatter = qobject_cast<QDeclarativeDateTimeFormatter*>(formatterComponent.create());
- if(formatterComponent.isError())
- qDebug() << formatterComponent.errors();
- QVERIFY(formatter != 0);
-
- QDate date(2008,12,24);
- QCOMPARE(formatter->date(), date);
- QCOMPARE(formatter->dateTime().date(), date);
- QCOMPARE(formatter->dateText(),date.toString(Qt::SystemLocaleShortDate));
-
- formatter->setLongStyle(true);
- QVERIFY(formatter->longStyle());
- QCOMPARE(formatter->dateText(),date.toString(Qt::SystemLocaleLongDate));
-
- formatter->setDateFormat("ddd MMMM d yy");
- QCOMPARE(formatter->dateFormat(), QLatin1String("ddd MMMM d yy"));
- QCOMPARE(formatter->dateText(),date.toString("ddd MMMM d yy"));
-
- QVERIFY(formatter->timeText().isEmpty());
- QVERIFY(formatter->dateTimeText().isEmpty());
-
- delete formatter;
-}
-
-void tst_qdeclarativedatetimeformatter::time()
-{
- QDeclarativeEngine engine;
- QDeclarativeComponent formatterComponent(&engine);
- formatterComponent.setData("import Qt 4.6\n DateTimeFormatter { time: \"14:15:38.200\" }", QUrl::fromLocalFile(""));
- QDeclarativeDateTimeFormatter *formatter = qobject_cast<QDeclarativeDateTimeFormatter*>(formatterComponent.create());
- if(formatterComponent.isError())
- qDebug() << formatterComponent.errors();
- QVERIFY(formatter != 0);
-
- QTime time(14,15,38,200);
-
- QCOMPARE(formatter->time(),time);
- QCOMPARE(formatter->dateTime().time(),time);
-
- QCOMPARE(formatter->timeText(),time.toString(Qt::SystemLocaleShortDate));
-
- formatter->setLongStyle(true);
- QCOMPARE(formatter->timeText(),time.toString(Qt::SystemLocaleLongDate));
-
- formatter->setTimeFormat("H:m:s a");
- QCOMPARE(formatter->timeFormat(), QLatin1String("H:m:s a"));
- QCOMPARE(formatter->timeText(),time.toString("H:m:s a"));
-
- formatter->setTimeFormat("hh:mm:ss.zzz");
- QCOMPARE(formatter->timeText(),time.toString("hh:mm:ss.zzz"));
-
- QVERIFY(formatter->dateText().isEmpty());
- QVERIFY(formatter->dateTimeText().isEmpty());
-
- delete formatter;
-}
-
-void tst_qdeclarativedatetimeformatter::dateTime()
-{
- QDeclarativeEngine engine;
- QDeclarativeComponent formatterComponent(&engine);
- formatterComponent.setData("import Qt 4.6\n DateTimeFormatter { dateTime: \"1978-03-04T09:13:54\" }", QUrl::fromLocalFile(""));
- QDeclarativeDateTimeFormatter *formatter = qobject_cast<QDeclarativeDateTimeFormatter*>(formatterComponent.create());
- if(formatterComponent.isError())
- qDebug() << formatterComponent.errors();
- QVERIFY(formatter != 0);
-
- QDateTime dateTime(QDate(1978,03,04),QTime(9,13,54));
- QCOMPARE(formatter->dateTime(),dateTime);
- QCOMPARE(formatter->date(),dateTime.date());
- QCOMPARE(formatter->time(),dateTime.time());
- QCOMPARE(formatter->dateTimeText(),dateTime.toString(Qt::SystemLocaleShortDate));
-
- formatter->setLongStyle(true);
- QCOMPARE(formatter->dateTimeText(),dateTime.toString(Qt::SystemLocaleLongDate));
-
- formatter->setDateTimeFormat("M/d/yy H:m:s a");
- QCOMPARE(formatter->dateTimeFormat(), QLatin1String("M/d/yy H:m:s a"));
- QCOMPARE(formatter->dateTimeText(),dateTime.toString("M/d/yy H:m:s a"));
-
- delete formatter;
-}
-
-QTEST_MAIN(tst_qdeclarativedatetimeformatter)
-
-#include "tst_qdeclarativedatetimeformatter.moc"
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml
new file mode 100644
index 0000000..2bdd706
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml
@@ -0,0 +1,16 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test = true;
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml
new file mode 100644
index 0000000..fa90918
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml
@@ -0,0 +1,22 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ Script {
+ function testFunction() {
+ if (this.b == 12)
+ test = true;
+ }
+ }
+
+ Component.onCompleted: {
+ var a = new Object;
+ a.b = 12;
+ root.argumentSignal.connect(a, testFunction);
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml
new file mode 100644
index 0000000..0d8e6ef
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml
@@ -0,0 +1,15 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ function testFunction() {
+ test = true;
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml
new file mode 100644
index 0000000..3e1ff1b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml
@@ -0,0 +1,12 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ Component.onCompleted: root.argumentSignal.connect(methodNoArgs);
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml
new file mode 100644
index 0000000..3ad5cbc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml
@@ -0,0 +1,11 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ Component.onCompleted: root.argumentSignal.connect(root, methodNoArgs);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml
new file mode 100644
index 0000000..8c35db1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ }
+
+ Component.onCompleted: {
+ root.argumentSignal.connect(testFunction);
+ root.argumentSignal.connect(testFunction);
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml
new file mode 100644
index 0000000..45c4f73
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml
@@ -0,0 +1,18 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(testFunction);
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml
new file mode 100644
index 0000000..a47fe74
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml
@@ -0,0 +1,19 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(root, testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(root, testFunction);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml
new file mode 100644
index 0000000..c95ffbf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml
@@ -0,0 +1,19 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(root, testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(testFunction);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
new file mode 100644
index 0000000..342f24a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ function otherFunction() {
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(otherFunction);
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index b5649cb..4838288 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -124,6 +124,8 @@ private slots:
void deletedObject();
void scriptScope();
void attachedPropertyScope();
+ void scriptConnect();
+ void scriptDisconnect();
void bug1();
@@ -1731,6 +1733,166 @@ void tst_qdeclarativeecmascript::attachedPropertyScope()
delete object;
}
+void tst_qdeclarativeecmascript::scriptConnect()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.1.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.2.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.3.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.4.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->methodCalled(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->methodCalled(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.5.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->methodCalled(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->methodCalled(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.6.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativeecmascript::scriptDisconnect()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptDisconnect.1.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 1);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->basicSignal();
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptDisconnect.2.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 1);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->basicSignal();
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptDisconnect.3.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 1);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->basicSignal();
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 3);
+
+ delete object;
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptDisconnect.4.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 1);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->basicSignal();
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 3);
+
+ delete object;
+ }
+
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml
new file mode 100644
index 0000000..40a2106
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml
@@ -0,0 +1,43 @@
+import Qt 4.6
+
+Item {
+ id: root; objectName: "root"
+ width: 200; height: 200
+
+ Item { id: itemA; objectName: "itemA"; x: 50; y: 50 }
+
+ Item {
+ x: 50; y: 50
+ Item { id: itemB; objectName: "itemB"; x: 100; y: 100 }
+ }
+
+ function mapAToB(x, y) {
+ var pos = itemA.mapToItem(itemB, x, y)
+ return Qt.point(pos.x, pos.y)
+ }
+
+ function mapAFromB(x, y) {
+ var pos = itemA.mapFromItem(itemB, x, y)
+ return Qt.point(pos.x, pos.y)
+ }
+
+ function mapAToNull(x, y) {
+ var pos = itemA.mapToItem(null, x, y)
+ return Qt.point(pos.x, pos.y)
+ }
+
+ function mapAFromNull(x, y) {
+ var pos = itemA.mapFromItem(null, x, y)
+ return Qt.point(pos.x, pos.y)
+ }
+
+ function checkMapAToInvalid(x, y) {
+ var pos = itemA.mapToItem(1122, x, y)
+ return pos.x == undefined && pos.y == undefined
+ }
+
+ function checkMapAFromInvalid(x, y) {
+ var pos = itemA.mapFromItem(1122, x, y)
+ return pos.x == undefined && pos.y == undefined
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index dbcba16..bbcc86e 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -58,6 +58,8 @@ private slots:
void keyNavigation();
void smooth();
void clip();
+ void mapCoordinates();
+ void mapCoordinates_data();
private:
template<typename T>
@@ -278,6 +280,8 @@ void tst_QDeclarativeItem::keyNavigation()
item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1");
QVERIFY(item);
QVERIFY(item->hasFocus());
+
+ delete canvas;
}
void tst_QDeclarativeItem::smooth()
@@ -301,6 +305,8 @@ void tst_QDeclarativeItem::smooth()
QCOMPARE(spy.count(),2);
item->setSmooth(false);
QCOMPARE(spy.count(),2);
+
+ delete item;
}
void tst_QDeclarativeItem::clip()
@@ -324,6 +330,66 @@ void tst_QDeclarativeItem::clip()
QCOMPARE(spy.count(),2);
item->setClip(false);
QCOMPARE(spy.count(),2);
+
+ delete item;
+}
+
+void tst_QDeclarativeItem::mapCoordinates()
+{
+ QFETCH(int, x);
+ QFETCH(int, y);
+
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(300, 300);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/mapCoordinates.qml"));
+ canvas->show();
+ qApp->processEvents();
+
+ QDeclarativeItem *root = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
+ QVERIFY(root != 0);
+ QDeclarativeItem *a = findItem<QDeclarativeItem>(canvas->rootObject(), "itemA");
+ QVERIFY(a != 0);
+ QDeclarativeItem *b = findItem<QDeclarativeItem>(canvas->rootObject(), "itemB");
+ QVERIFY(b != 0);
+
+ QVariant result;
+
+ QVERIFY(QMetaObject::invokeMethod(root, "mapAToB",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapToItem(b, x, y));
+
+ QVERIFY(QMetaObject::invokeMethod(root, "mapAFromB",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapFromItem(b, x, y));
+
+ QVERIFY(QMetaObject::invokeMethod(root, "mapAToNull",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapToScene(x, y));
+
+ QVERIFY(QMetaObject::invokeMethod(root, "mapAFromNull",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapFromScene(x, y));
+
+ QTest::ignoreMessage(QtWarningMsg, "mapToItem() given argument \"1122\" which is neither null nor an Item");
+ QVERIFY(QMetaObject::invokeMethod(root, "checkMapAToInvalid",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QVERIFY(result.toBool());
+
+ QTest::ignoreMessage(QtWarningMsg, "mapFromItem() given argument \"1122\" which is neither null nor an Item");
+ QVERIFY(QMetaObject::invokeMethod(root, "checkMapAFromInvalid",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QVERIFY(result.toBool());
+
+ delete canvas;
+}
+
+void tst_QDeclarativeItem::mapCoordinates_data()
+{
+ QTest::addColumn<int>("x");
+ QTest::addColumn<int>("y");
+
+ for (int i=-20; i<=20; i+=10)
+ QTest::newRow(QTest::toString(i)) << i << i;
}
template<typename T>
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt
new file mode 100644
index 0000000..d4e0cc0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt
@@ -0,0 +1 @@
+3:1:Element is not creatable.
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml
new file mode 100644
index 0000000..a723269
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+Font {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 3ce15cb..da0bf1a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -326,6 +326,7 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("invalidRoot") << "invalidRoot.qml" << "invalidRoot.errors.txt" << false;
QTest::newRow("missingValueTypeProperty") << "missingValueTypeProperty.qml" << "missingValueTypeProperty.errors.txt" << false;
QTest::newRow("objectValueTypeProperty") << "objectValueTypeProperty.qml" << "objectValueTypeProperty.errors.txt" << false;
+ QTest::newRow("enumTypes") << "enumTypes.qml" << "enumTypes.errors.txt" << false;
}
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index a36224f..1df4448 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -450,7 +450,7 @@ void tst_QDeclarativeListView::inserted()
model.insertItem(1, "Will", "9876");
// let transitions settle.
- QTest::qWait(500);
+ QTest::qWait(300);
QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
@@ -470,7 +470,7 @@ void tst_QDeclarativeListView::inserted()
model.insertItem(0, "Foo", "1111"); // zero index, and current item
// let transitions settle.
- QTest::qWait(500);
+ QTest::qWait(300);
QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
@@ -491,14 +491,14 @@ void tst_QDeclarativeListView::inserted()
for (int i = model.count(); i < 30; ++i)
model.insertItem(i, "Hello", QString::number(i));
- QTest::qWait(500);
+ QTest::qWait(300);
listview->setContentY(80);
- QTest::qWait(500);
+ QTest::qWait(300);
// Insert item outside visible area
model.insertItem(1, "Hello", "1324");
- QTest::qWait(500);
+ QTest::qWait(300);
QVERIFY(listview->contentY() == 80);
@@ -543,7 +543,7 @@ void tst_QDeclarativeListView::removed(bool animated)
model.removeItem(1);
// let transitions settle.
- QTest::qWait(500);
+ QTest::qWait(300);
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
QVERIFY(name != 0);
@@ -565,7 +565,7 @@ void tst_QDeclarativeListView::removed(bool animated)
model.removeItem(0); // post: top item starts at 20
// let transitions settle.
- QTest::qWait(500);
+ QTest::qWait(300);
name = findItem<QDeclarativeText>(viewport, "textName", 0);
QVERIFY(name != 0);
@@ -586,7 +586,7 @@ void tst_QDeclarativeListView::removed(bool animated)
// Remove items not visible
model.removeItem(18);
// let transitions settle.
- QTest::qWait(500);
+ QTest::qWait(300);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
@@ -603,7 +603,7 @@ void tst_QDeclarativeListView::removed(bool animated)
model.removeItem(1); // post: top item will be at 40
// let transitions settle.
- QTest::qWait(500);
+ QTest::qWait(300);
// Confirm items positioned correctly
for (int i = 2; i < 18; ++i) {
@@ -617,14 +617,14 @@ void tst_QDeclarativeListView::removed(bool animated)
QVERIFY(listview->currentIndex() == 9);
QDeclarativeItem *oldCurrent = listview->currentItem();
model.removeItem(9);
- QTest::qWait(500);
+ QTest::qWait(300);
QCOMPARE(listview->currentIndex(), 9);
QVERIFY(listview->currentItem() != oldCurrent);
listview->setContentY(40); // That's the top now
// let transitions settle.
- QTest::qWait(500);
+ QTest::qWait(300);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
@@ -637,20 +637,20 @@ void tst_QDeclarativeListView::removed(bool animated)
// remove current item beyond visible items.
listview->setCurrentIndex(20);
- QTest::qWait(500);
+ QTest::qWait(300);
listview->setContentY(40);
model.removeItem(20);
- QTest::qWait(500);
+ QTest::qWait(300);
QCOMPARE(listview->currentIndex(), 20);
QVERIFY(listview->currentItem() != 0);
// remove item before current, but visible
listview->setCurrentIndex(8);
- QTest::qWait(500);
+ QTest::qWait(300);
oldCurrent = listview->currentItem();
model.removeItem(6);
- QTest::qWait(500);
+ QTest::qWait(300);
QCOMPARE(listview->currentIndex(), 7);
QVERIFY(listview->currentItem() == oldCurrent);
@@ -1028,22 +1028,16 @@ void tst_QDeclarativeListView::currentIndex()
QCOMPARE(listview->contentY(), 0.0);
// Test keys
+ qApp->setActiveWindow(canvas);
canvas->show();
+ canvas->setFocus();
qApp->processEvents();
- QEvent wa(QEvent::WindowActivate);
- QApplication::sendEvent(canvas, &wa);
- QFocusEvent fe(QEvent::FocusIn);
- QApplication::sendEvent(canvas, &fe);
-
- QKeyEvent key(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier, "", false, 1);
- QApplication::sendEvent(canvas, &key);
- QVERIFY(key.isAccepted());
+ QTest::keyClick(canvas, Qt::Key_Down);
+ QEXPECT_FAIL("", "QTBUG-8475", Abort);
QCOMPARE(listview->currentIndex(), 1);
- key = QKeyEvent(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier, "", false, 1);
- QApplication::sendEvent(canvas, &key);
- QVERIFY(key.isAccepted());
+ QTest::keyClick(canvas, Qt::Key_Up);
QCOMPARE(listview->currentIndex(), 0);
// turn off auto highlight
diff --git a/tests/auto/declarative/qdeclarativenumberformatter/qdeclarativenumberformatter.pro b/tests/auto/declarative/qdeclarativenumberformatter/qdeclarativenumberformatter.pro
deleted file mode 100644
index 672e95c..0000000
--- a/tests/auto/declarative/qdeclarativenumberformatter/qdeclarativenumberformatter.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative
-macx:CONFIG -= app_bundle
-
-SOURCES += tst_qdeclarativenumberformatter.cpp
diff --git a/tests/auto/declarative/qdeclarativenumberformatter/tst_qdeclarativenumberformatter.cpp b/tests/auto/declarative/qdeclarativenumberformatter/tst_qdeclarativenumberformatter.cpp
deleted file mode 100644
index a9a0077..0000000
--- a/tests/auto/declarative/qdeclarativenumberformatter/tst_qdeclarativenumberformatter.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qtest.h>
-#include <QDebug>
-#include <QtDeclarative/qdeclarativeengine.h>
-#include <QtDeclarative/qdeclarativecomponent.h>
-#include <private/qnumberformat_p.h>
-#include <private/qdeclarativenumberformatter_p.h>
-
-class tst_qdeclarativenumberformatter : public QObject
-{
- Q_OBJECT
-public:
- tst_qdeclarativenumberformatter();
-
- void init() {}
- void initTestCase() {}
-
- void cleanup() {}
- void cleanupTestCase() {}
-
-private slots:
- void text_data();
- void text();
-
-private:
- QStringList strings;
- QStringList formats;
- QStringList texts;
-};
-
-tst_qdeclarativenumberformatter::tst_qdeclarativenumberformatter()
-{
- strings << "100.0"
- << "12345"
- << "1234567"
- << "0.123"
- << "0.9999"
- << "0.989"
- << "1"
- << "1.0"
- << "1.01";
-
- formats << ""
- << "0000"
- << "0000.00"
- << "##"
- << "##.##"
- << "#0.00#"
- << "##,##0.##"
- << "(000) 000 - 000"
- << "00000,000.0000";
-
- //US locale only.
- texts << "100.000000"
- << "12345.000000"
- << "1234567.000000"
- << "0.123000"
- << "0.999900"
- << "0.989000"
- << "1.000000"
- << "1.000000"
- << "1.010000" //end ""
- << "0100"
- << "12345"
- << "1234567"
- << "0000"
- << "0001"
- << "0001"
- << "0001"
- << "0001"
- << "0001" // end "0000"
- << "0100.00"
- << "12345.00"
- << "1234567.00"
- << "0000.12"
- << "0001.00"
- << "0000.99"
- << "0001.00"
- << "0001.00"
- << "0001.01" // end "0000.00"
- << "100"
- << "12345"
- << "1234567"
- << "0"
- << "1"
- << "1"
- << "1"
- << "1"
- << "1" // end "##"
- << "100"//start "##.##"
- << "12345"
- << "1234567"
- << "0.12"
- << "1"
- << "0.99"
- << "1"
- << "1"
- << "1.01" // end "##.##" -- ### EXPECT FAIL ### QNumberFormat::formatDecimal() bug
- << "100.00" //start "#0.00#"
- << "12345.00"
- << "1234567.00"
- << "0.123"
- << "1.00"
- << "0.989"
- << "1.00"
- << "1.00"
- << "1.01" //end "#0.00#"
- << "100" //start "##,##0.##"
- << "12,345"
- << "1,234,567"
- << "0.12"
- << "1"
- << "0.99"
- << "1"
- << "1"
- << "1.01" //end "##,##0.##" -- ### EXPECT FAIL ### QNumberFormat::formatDecimal() bug
- << "(000) 000 - 100" //start "(000) 000 - 000"
- << "(000) 012 - 345"
- << "(001) 234 - 567"
- << "(000) 000 - 000"
- << "(000) 000 - 001"
- << "(000) 000 - 001"
- << "(000) 000 - 001"
- << "(000) 000 - 001"
- << "(000) 000 - 001" // end "(000) 000 - 000"
- << "00,000,100.0000" // start "00000,000.0000"
- << "00,012,345.0000"
- << "01,234,567.0000"
- << "00,000,000.1230"
- << "00,000,000.9999"
- << "00,000,000.9890"
- << "00,000,001.0000"
- << "00,000,001.0000"
- << "00,000,001.0100"; // end
-
- /*
- qDebug() << "strings.size()" << strings.size()
- << "\nformats.size()" << formats.size()
- << "texts.size()" << texts.size();
- */
-}
-
-void tst_qdeclarativenumberformatter::text_data()
-{
- QTest::addColumn<QString>("string");
- QTest::addColumn<QString>("format");
- QTest::addColumn<QString>("text");
-
- for (int j=0; j < formats.size(); j++)
- {
- for (int i=0; i < strings.size(); i++)
- {
- QTest::newRow(QString("%1, %2").arg(strings.at(i)).arg(formats.at(j)).toAscii())
- << strings.at(i) << formats.at(j) << texts.at(j*formats.size()+i);
- }
- }
-
-}
-
-void tst_qdeclarativenumberformatter::text()
-{
- QFETCH(QString, string);
- QFETCH(QString, format);
- QFETCH(QString, text);
-
- QString componentStr = QString("import Qt 4.6\nNumberFormatter { number: ") + string + QString("; format: \"") + format + QString("\" }");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent formatterComponent(&engine);
- formatterComponent.setData(componentStr.toUtf8(), QUrl::fromLocalFile(""));
- if(formatterComponent.isError())
- qDebug() << formatterComponent.errors();
- QVERIFY(formatterComponent.isReady());
- QDeclarativeNumberFormatter *formatter = qobject_cast<QDeclarativeNumberFormatter*>(formatterComponent.create());
- QVERIFY(formatter != 0);
-
- QCOMPARE(formatter->format(), format);
- QCOMPARE(formatter->text(), text);
-
- delete formatter;
-}
-
-QTEST_MAIN(tst_qdeclarativenumberformatter)
-
-#include "tst_qdeclarativenumberformatter.moc"
diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
index b120d5d..1dfec50 100644
--- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
+++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include <QtTest/QSignalSpy>
#include <qtest.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
@@ -161,6 +162,18 @@ void tst_qdeclarativetimer::repeat()
QVERIFY(helper.count == oldCount);
QVERIFY(timer->isRunning() == false);
+ QSignalSpy spy(timer, SIGNAL(repeatChanged()));
+
+ timer->setRepeating(false);
+ QVERIFY(!timer->isRepeating());
+ QCOMPARE(spy.count(),1);
+
+ timer->setRepeating(false);
+ QCOMPARE(spy.count(),1);
+
+ timer->setRepeating(true);
+ QCOMPARE(spy.count(),2);
+
delete timer;
}
@@ -184,6 +197,18 @@ void tst_qdeclarativetimer::triggeredOnStart()
QCOMPARE(helper.count, 2);
QVERIFY(timer->isRunning() == false);
+ QSignalSpy spy(timer, SIGNAL(triggeredOnStartChanged()));
+
+ timer->setTriggeredOnStart(false);
+ QVERIFY(!timer->triggeredOnStart());
+ QCOMPARE(spy.count(),1);
+
+ timer->setTriggeredOnStart(false);
+ QCOMPARE(spy.count(),1);
+
+ timer->setTriggeredOnStart(true);
+ QCOMPARE(spy.count(),2);
+
delete timer;
}
@@ -250,6 +275,18 @@ void tst_qdeclarativetimer::changeDuration()
QCOMPARE(helper.count, 3);
QVERIFY(timer->isRunning());
+ QSignalSpy spy(timer, SIGNAL(intervalChanged()));
+
+ timer->setInterval(200);
+ QCOMPARE(timer->interval(), 200);
+ QCOMPARE(spy.count(),1);
+
+ timer->setInterval(200);
+ QCOMPARE(spy.count(),1);
+
+ timer->setInterval(300);
+ QCOMPARE(spy.count(),2);
+
delete timer;
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml
index 0eadd50..cb01a80 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml
@@ -1,6 +1,6 @@
import Test 1.0
MyTypeObject {
- font.capitalization: "MixedCase"
+ font.capitalization: "AllUppercase"
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml
index 81f1c92..93f1ed5 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml
@@ -1,6 +1,6 @@
import Test 1.0
MyTypeObject {
- font.capitalization: if (1) "MixedCase"
+ font.capitalization: if (1) "AllUppercase"
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml
new file mode 100644
index 0000000..3be5099
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ font.capitalization: Font.AllUppercase
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml
new file mode 100644
index 0000000..6b494e4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+import Qt 4.6 as MyQt
+
+MyTypeObject {
+ font.capitalization: MyQt.Font.AllUppercase
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
index 8732215..51f9a07 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
+++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
@@ -597,7 +597,7 @@ void tst_qdeclarativevaluetypes::enums()
QDeclarativeComponent component(&engine, TEST_FILE("enums.1.qml"));
MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
QVERIFY(object != 0);
- QVERIFY(object->font().capitalization() == QFont::MixedCase);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
delete object;
}
@@ -605,7 +605,23 @@ void tst_qdeclarativevaluetypes::enums()
QDeclarativeComponent component(&engine, TEST_FILE("enums.2.qml"));
MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
QVERIFY(object != 0);
- QVERIFY(object->font().capitalization() == QFont::MixedCase);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.3.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.4.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
delete object;
}
}
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
index 27ecef4..4f9f21a 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
+++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
@@ -100,6 +100,7 @@ void tst_QDeclarativeWorkerScript::source()
QCOMPARE(item->source(), source);
qApp->processEvents();
+ delete item;
}
void tst_QDeclarativeWorkerScript::source_data()
@@ -126,6 +127,7 @@ void tst_QDeclarativeWorkerScript::messaging()
QCOMPARE(mo->property(mo->indexOfProperty("response")).read(worker).value<QVariant>(), value);
qApp->processEvents();
+ delete item;
}
void tst_QDeclarativeWorkerScript::messaging_data()
@@ -162,6 +164,7 @@ void tst_QDeclarativeWorkerScript::messaging_sendQObjectList()
QCOMPARE(result, (QVariantList() << QVariant() << QVariant() << QVariant()));
qApp->processEvents();
+ delete item;
}
void tst_QDeclarativeWorkerScript::messaging_sendJsObject()
@@ -187,6 +190,7 @@ void tst_QDeclarativeWorkerScript::messaging_sendJsObject()
QVERIFY(result.toBool());
qApp->processEvents();
+ delete item;
}
QTEST_MAIN(tst_QDeclarativeWorkerScript)
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
new file mode 100644
index 0000000..63165ab
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+
+QtObject {
+ property bool dataOK: false
+
+ property string responseText
+ property string responseXmlRootNodeValue
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "utf16.xml");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+
+ responseText = x.responseText
+ if (x.responseXML)
+ responseXmlRootNodeValue = x.responseXML.documentElement.childNodes[0].nodeValue
+
+ dataOK = true;
+ }
+ }
+ x.send()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml
new file mode 100644
index 0000000..0fbb126
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
index 7dec0ee..13ed959 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
@@ -69,6 +69,7 @@ private slots:
void constructor();
void defaultState();
void open();
+ void open_data();
void open_invalid_method();
void open_sync();
void open_arg_count();
@@ -82,6 +83,7 @@ private slots:
void send_alreadySent();
void send_ignoreData();
void send_withdata();
+ void send_withdata_data();
void abort();
void abort_unsent();
void abort_opened();
@@ -94,11 +96,15 @@ private slots:
void getAllResponseHeaders_sent();
void getAllResponseHeaders_args();
void status();
+ void status_data();
void statusText();
+ void statusText_data();
void responseText();
+ void responseText_data();
void responseXML_invalid();
void invalidMethodUsage();
void redirects();
+ void nonUtf8();
// Attributes
void document();
@@ -257,99 +263,50 @@ void tst_qdeclarativexmlhttprequest::defaultState()
// Test valid XMLHttpRequest.open() calls
void tst_qdeclarativexmlhttprequest::open()
{
- // Relative url
- {
- QDeclarativeComponent component(&engine, TEST_FILE("open.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "testdocument.html");
- component.completeCreate();
-
- QCOMPARE(object->property("readyState").toBool(), true);
- QCOMPARE(object->property("openedState").toBool(), true);
- QCOMPARE(object->property("status").toBool(), true);
- QCOMPARE(object->property("statusText").toBool(), true);
- QCOMPARE(object->property("responseText").toBool(), true);
- QCOMPARE(object->property("responseXML").toBool(), true);
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
-
- delete object;
+ QFETCH(QUrl, qmlFile);
+ QFETCH(QString, url);
+ QFETCH(bool, remote);
+
+ TestHTTPServer *server = 0;
+ if (remote) {
+ server = new TestHTTPServer(SERVER_PORT);
+ QVERIFY(server->isValid());
+ QVERIFY(server->wait(TEST_FILE("open_network.expect"),
+ TEST_FILE("open_network.reply"),
+ TEST_FILE("testdocument.html")));
}
- // Absolute url
- {
- QDeclarativeComponent component(&engine, TEST_FILE("open.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", TEST_FILE("testdocument.html").toString());
- component.completeCreate();
-
- QCOMPARE(object->property("readyState").toBool(), true);
- QCOMPARE(object->property("openedState").toBool(), true);
- QCOMPARE(object->property("status").toBool(), true);
- QCOMPARE(object->property("statusText").toBool(), true);
- QCOMPARE(object->property("responseText").toBool(), true);
- QCOMPARE(object->property("responseXML").toBool(), true);
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
-
- delete object;
- }
-
- // Absolute network url
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("open_network.expect"),
- TEST_FILE("open_network.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("open.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
-
- QCOMPARE(object->property("readyState").toBool(), true);
- QCOMPARE(object->property("openedState").toBool(), true);
- QCOMPARE(object->property("status").toBool(), true);
- QCOMPARE(object->property("statusText").toBool(), true);
- QCOMPARE(object->property("responseText").toBool(), true);
- QCOMPARE(object->property("responseXML").toBool(), true);
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
-
- delete object;
- }
+ QDeclarativeComponent component(&engine, qmlFile);
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", url);
+ component.completeCreate();
- // User/pass
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("open_network.expect"),
- TEST_FILE("open_network.reply"),
- TEST_FILE("testdocument.html")));
+ QCOMPARE(object->property("readyState").toBool(), true);
+ QCOMPARE(object->property("openedState").toBool(), true);
+ QCOMPARE(object->property("status").toBool(), true);
+ QCOMPARE(object->property("statusText").toBool(), true);
+ QCOMPARE(object->property("responseText").toBool(), true);
+ QCOMPARE(object->property("responseXML").toBool(), true);
- QDeclarativeComponent component(&engine, TEST_FILE("open_user.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
+ TRY_WAIT(object->property("dataOK").toBool() == true);
- QCOMPARE(object->property("readyState").toBool(), true);
- QCOMPARE(object->property("openedState").toBool(), true);
- QCOMPARE(object->property("status").toBool(), true);
- QCOMPARE(object->property("statusText").toBool(), true);
- QCOMPARE(object->property("responseText").toBool(), true);
- QCOMPARE(object->property("responseXML").toBool(), true);
+ delete server;
+ delete object;
+}
- TRY_WAIT(object->property("dataOK").toBool() == true);
+void tst_qdeclarativexmlhttprequest::open_data()
+{
+ QTest::addColumn<QUrl>("qmlFile");
+ QTest::addColumn<QString>("url");
+ QTest::addColumn<bool>("remote");
- // ### Check that the username/password were sent to the server
+ QTest::newRow("Relative url)") << TEST_FILE("open.qml") << "testdocument.html" << false;
+ QTest::newRow("Absolute url)") << TEST_FILE("open.qml") << TEST_FILE("testdocument.html").toString() << false;
+ QTest::newRow("Absolute network url)") << TEST_FILE("open.qml") << "http://127.0.0.1:14445/testdocument.html" << true;
- delete object;
- }
+ // ### Check that the username/password were sent to the server
+ QTest::newRow("User/pass") << TEST_FILE("open_user.qml") << "http://127.0.0.1:14445/testdocument.html" << true;
}
// Test that calling XMLHttpRequest.open() with an invalid method raises an exception
@@ -594,138 +551,38 @@ void tst_qdeclarativexmlhttprequest::send_ignoreData()
// Test that send()'ing data works
void tst_qdeclarativexmlhttprequest::send_withdata()
{
- // No content-type
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("send_data.1.expect"),
- TEST_FILE("send_data.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("send_data.1.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
+ QFETCH(QString, file_expected);
+ QFETCH(QString, file_qml);
- delete object;
- }
-
- // Correct content-type
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("send_data.1.expect"),
- TEST_FILE("send_data.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("send_data.2.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
-
- delete object;
- }
-
- // Incorrect content-type
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("send_data.1.expect"),
- TEST_FILE("send_data.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("send_data.3.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
-
- delete object;
- }
-
- // Correct content-type - out of order
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("send_data.4.expect"),
- TEST_FILE("send_data.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("send_data.4.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
-
- delete object;
- }
-
- // Incorrect content-type - out of order
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("send_data.4.expect"),
- TEST_FILE("send_data.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("send_data.5.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
-
- delete object;
- }
-
- // PUT
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("send_data.6.expect"),
- TEST_FILE("send_data.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("send_data.6.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
-
- delete object;
- }
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE(file_expected),
+ TEST_FILE("send_data.reply"),
+ TEST_FILE("testdocument.html")));
- // Correct content-type - no charset
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("send_data.1.expect"),
- TEST_FILE("send_data.reply"),
- TEST_FILE("testdocument.html")));
+ QDeclarativeComponent component(&engine, TEST_FILE(file_qml));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
- QDeclarativeComponent component(&engine, TEST_FILE("send_data.7.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- component.completeCreate();
+ TRY_WAIT(object->property("dataOK").toBool() == true);
- TRY_WAIT(object->property("dataOK").toBool() == true);
+ delete object;
+}
- delete object;
- }
+void tst_qdeclarativexmlhttprequest::send_withdata_data()
+{
+ QTest::addColumn<QString>("file_expected");
+ QTest::addColumn<QString>("file_qml");
+
+ QTest::newRow("No content-type") << "send_data.1.expect" << "send_data.1.qml";
+ QTest::newRow("Correct content-type") << "send_data.1.expect" << "send_data.2.qml";
+ QTest::newRow("Incorrect content-type") << "send_data.1.expect" << "send_data.3.qml";
+ QTest::newRow("Correct content-type - out of order") << "send_data.4.expect" << "send_data.4.qml";
+ QTest::newRow("Incorrect content-type - out of order") << "send_data.4.expect" << "send_data.5.qml";
+ QTest::newRow("PUT") << "send_data.6.expect" << "send_data.6.qml";
+ QTest::newRow("Correct content-type - no charset") << "send_data.1.expect" << "send_data.7.qml";
}
// Test abort() has no effect in unsent state
@@ -940,200 +797,149 @@ void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_args()
void tst_qdeclarativexmlhttprequest::status()
{
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("status.expect"),
- TEST_FILE("status.200.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("status.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- object->setProperty("expectedStatus", 200);
- component.completeCreate();
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
+ QFETCH(QUrl, replyUrl);
+ QFETCH(int, status);
- QCOMPARE(object->property("unsentException").toBool(), true);
- QCOMPARE(object->property("openedException").toBool(), true);
- QCOMPARE(object->property("sentException").toBool(), true);
- QCOMPARE(object->property("headersReceived").toBool(), true);
- QCOMPARE(object->property("loading").toBool(), true);
- QCOMPARE(object->property("done").toBool(), true);
- QCOMPARE(object->property("resetException").toBool(), true);
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("status.expect"),
+ replyUrl,
+ TEST_FILE("testdocument.html")));
- delete object;
- }
+ QDeclarativeComponent component(&engine, TEST_FILE("status.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ object->setProperty("expectedStatus", status);
+ component.completeCreate();
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("status.expect"),
- TEST_FILE("status.404.reply"),
- TEST_FILE("testdocument.html")));
+ TRY_WAIT(object->property("dataOK").toBool() == true);
- QDeclarativeComponent component(&engine, TEST_FILE("status.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- object->setProperty("expectedStatus", 404);
- component.completeCreate();
+ QCOMPARE(object->property("unsentException").toBool(), true);
+ QCOMPARE(object->property("openedException").toBool(), true);
+ QCOMPARE(object->property("sentException").toBool(), true);
+ QCOMPARE(object->property("headersReceived").toBool(), true);
+ QCOMPARE(object->property("loading").toBool(), true);
+ QCOMPARE(object->property("done").toBool(), true);
+ QCOMPARE(object->property("resetException").toBool(), true);
- TRY_WAIT(object->property("dataOK").toBool() == true);
+ delete object;
+}
- QCOMPARE(object->property("unsentException").toBool(), true);
- QCOMPARE(object->property("openedException").toBool(), true);
- QCOMPARE(object->property("sentException").toBool(), true);
- QCOMPARE(object->property("headersReceived").toBool(), true);
- QCOMPARE(object->property("loading").toBool(), true);
- QCOMPARE(object->property("done").toBool(), true);
- QCOMPARE(object->property("resetException").toBool(), true);
+void tst_qdeclarativexmlhttprequest::status_data()
+{
+ QTest::addColumn<QUrl>("replyUrl");
+ QTest::addColumn<int>("status");
- delete object;
- }
+ QTest::newRow("OK") << TEST_FILE("status.200.reply") << 200;
+ QTest::newRow("Not Found") << TEST_FILE("status.404.reply") << 404;
}
void tst_qdeclarativexmlhttprequest::statusText()
{
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("status.expect"),
- TEST_FILE("status.200.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("statusText.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- object->setProperty("expectedStatus", "OK");
- component.completeCreate();
-
- TRY_WAIT(object->property("dataOK").toBool() == true);
+ QFETCH(QUrl, replyUrl);
+ QFETCH(QString, statusText);
- QCOMPARE(object->property("unsentException").toBool(), true);
- QCOMPARE(object->property("openedException").toBool(), true);
- QCOMPARE(object->property("sentException").toBool(), true);
- QCOMPARE(object->property("headersReceived").toBool(), true);
- QCOMPARE(object->property("loading").toBool(), true);
- QCOMPARE(object->property("done").toBool(), true);
- QCOMPARE(object->property("resetException").toBool(), true);
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("status.expect"),
+ replyUrl,
+ TEST_FILE("testdocument.html")));
- delete object;
- }
+ QDeclarativeComponent component(&engine, TEST_FILE("statusText.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ object->setProperty("expectedStatus", statusText);
+ component.completeCreate();
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("status.expect"),
- TEST_FILE("status.404.reply"),
- TEST_FILE("testdocument.html")));
+ TRY_WAIT(object->property("dataOK").toBool() == true);
- QDeclarativeComponent component(&engine, TEST_FILE("statusText.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- object->setProperty("expectedStatus", "Document not found");
- component.completeCreate();
+ QCOMPARE(object->property("unsentException").toBool(), true);
+ QCOMPARE(object->property("openedException").toBool(), true);
+ QCOMPARE(object->property("sentException").toBool(), true);
+ QCOMPARE(object->property("headersReceived").toBool(), true);
+ QCOMPARE(object->property("loading").toBool(), true);
+ QCOMPARE(object->property("done").toBool(), true);
+ QCOMPARE(object->property("resetException").toBool(), true);
- TRY_WAIT(object->property("dataOK").toBool() == true);
+ delete object;
+}
- QCOMPARE(object->property("unsentException").toBool(), true);
- QCOMPARE(object->property("openedException").toBool(), true);
- QCOMPARE(object->property("sentException").toBool(), true);
- QCOMPARE(object->property("headersReceived").toBool(), true);
- QCOMPARE(object->property("loading").toBool(), true);
- QCOMPARE(object->property("done").toBool(), true);
- QCOMPARE(object->property("resetException").toBool(), true);
+void tst_qdeclarativexmlhttprequest::statusText_data()
+{
+ QTest::addColumn<QUrl>("replyUrl");
+ QTest::addColumn<QString>("statusText");
- delete object;
- }
+ QTest::newRow("OK") << TEST_FILE("status.200.reply") << "OK";
+ QTest::newRow("Not Found") << TEST_FILE("status.404.reply") << "Document not found";
}
void tst_qdeclarativexmlhttprequest::responseText()
{
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("status.expect"),
- TEST_FILE("status.200.reply"),
- TEST_FILE("testdocument.html")));
-
- QDeclarativeComponent component(&engine, TEST_FILE("responseText.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- object->setProperty("expectedText", "QML Rocks!\n");
- component.completeCreate();
+ QFETCH(QUrl, replyUrl);
+ QFETCH(QUrl, bodyUrl);
+ QFETCH(QString, responseText);
- TRY_WAIT(object->property("dataOK").toBool() == true);
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("status.expect"),
+ replyUrl,
+ bodyUrl));
- QCOMPARE(object->property("unsent").toBool(), true);
- QCOMPARE(object->property("opened").toBool(), true);
- QCOMPARE(object->property("sent").toBool(), true);
- QCOMPARE(object->property("headersReceived").toBool(), true);
- QCOMPARE(object->property("loading").toBool(), true);
- QCOMPARE(object->property("done").toBool(), true);
- QCOMPARE(object->property("reset").toBool(), true);
+ QDeclarativeComponent component(&engine, TEST_FILE("responseText.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ object->setProperty("expectedText", responseText);
+ component.completeCreate();
- delete object;
- }
+ TRY_WAIT(object->property("dataOK").toBool() == true);
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("status.expect"),
- TEST_FILE("status.200.reply"),
- QUrl()));
+ QCOMPARE(object->property("unsent").toBool(), true);
+ QCOMPARE(object->property("opened").toBool(), true);
+ QCOMPARE(object->property("sent").toBool(), true);
+ QCOMPARE(object->property("headersReceived").toBool(), true);
+ QCOMPARE(object->property("loading").toBool(), true);
+ QCOMPARE(object->property("done").toBool(), true);
+ QCOMPARE(object->property("reset").toBool(), true);
- QDeclarativeComponent component(&engine, TEST_FILE("responseText.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- object->setProperty("expectedText", "");
- component.completeCreate();
+ delete object;
+}
- TRY_WAIT(object->property("dataOK").toBool() == true);
+void tst_qdeclarativexmlhttprequest::responseText_data()
+{
+ QTest::addColumn<QUrl>("replyUrl");
+ QTest::addColumn<QUrl>("bodyUrl");
+ QTest::addColumn<QString>("responseText");
- QCOMPARE(object->property("unsent").toBool(), true);
- QCOMPARE(object->property("opened").toBool(), true);
- QCOMPARE(object->property("sent").toBool(), true);
- QCOMPARE(object->property("headersReceived").toBool(), true);
- QCOMPARE(object->property("loading").toBool(), true);
- QCOMPARE(object->property("done").toBool(), true);
- QCOMPARE(object->property("reset").toBool(), true);
+ QTest::newRow("OK") << TEST_FILE("status.200.reply") << TEST_FILE("testdocument.html") << "QML Rocks!\n";
+ QTest::newRow("empty body") << TEST_FILE("status.200.reply") << QUrl() << "";
+ QTest::newRow("Not Found") << TEST_FILE("status.404.reply") << TEST_FILE("testdocument.html") << "";
+}
- delete object;
- }
+void tst_qdeclarativexmlhttprequest::nonUtf8()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("utf16.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
- {
- TestHTTPServer server(SERVER_PORT);
- QVERIFY(server.isValid());
- QVERIFY(server.wait(TEST_FILE("status.expect"),
- TEST_FILE("status.404.reply"),
- TEST_FILE("testdocument.html")));
+ QString uc;
+ uc.resize(3);
+ uc[0] = QChar(0x10e3);
+ uc[1] = QChar(' ');
+ uc[2] = QChar(0x03a3);
+ QString xml = "<?xml version=\"1.0\" encoding=\"UTF-16\" standalone='yes'?>\n<root>\n" + uc + "\n</root>\n";
- QDeclarativeComponent component(&engine, TEST_FILE("responseText.qml"));
- QObject *object = component.beginCreate(engine.rootContext());
- QVERIFY(object != 0);
- object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
- object->setProperty("expectedText", "");
- component.completeCreate();
+ TRY_WAIT(object->property("dataOK").toBool() == true);
- TRY_WAIT(object->property("dataOK").toBool() == true);
+ QString responseText = object->property("responseText").toString();
+ QCOMPARE(responseText, xml);
- QCOMPARE(object->property("unsent").toBool(), true);
- QCOMPARE(object->property("opened").toBool(), true);
- QCOMPARE(object->property("sent").toBool(), true);
- QCOMPARE(object->property("headersReceived").toBool(), true);
- QCOMPARE(object->property("loading").toBool(), true);
- QCOMPARE(object->property("done").toBool(), true);
- QCOMPARE(object->property("reset").toBool(), true);
+ QString responseXmlText = object->property("responseXmlRootNodeValue").toString();
+ QCOMPARE(responseXmlText, '\n' + uc + '\n');
- delete object;
- }
+ delete object;
}
// Test that calling hte XMLHttpRequest methods on a non-XMLHttpRequest object
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml
new file mode 100644
index 0000000..737ec81
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+XmlListModel {
+ source: "model.xml"
+ query: "/Pets/Pet"
+ XmlRole { objectName: "role"; name: "name"; query: "name/string()" }
+ XmlRole { name: "type"; query: "type/string()" }
+ XmlRole { name: "age"; query: "age/number()" }
+ XmlRole { name: "size"; query: "size/string()" }
+}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index 68029bc..0e5e1b0 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -74,6 +74,7 @@ private slots:
void useKeys_data();
void noKeysValueChanges();
void keysChanged();
+ void propertyChanges();
private:
QString makeItemXmlAndData(const QString &data, QDeclarativeXmlModelData *modelData = 0) const
@@ -266,6 +267,8 @@ void tst_qdeclarativexmllistmodel::reload()
QCOMPARE(spyRemove[0][0].toInt(), 0);
QCOMPARE(spyRemove[0][1].toInt(), 9);
+
+ delete model;
}
void tst_qdeclarativexmllistmodel::useKeys()
@@ -284,7 +287,7 @@ void tst_qdeclarativexmllistmodel::useKeys()
QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/roleKeys.qml"));
QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
QVERIFY(model != 0);
-
+
model->setXml(oldXml);
QTRY_COMPARE(model->count(), oldCount);
@@ -319,6 +322,8 @@ void tst_qdeclarativexmllistmodel::useKeys()
QCOMPARE(spyRemove[i][0].toInt(), removeRanges[i].first);
QCOMPARE(spyRemove[i][1].toInt(), removeRanges[i].second);
}
+
+ delete model;
}
void tst_qdeclarativexmllistmodel::useKeys_data()
@@ -440,6 +445,8 @@ void tst_qdeclarativexmllistmodel::noKeysValueChanges()
model->setXml(xml);
QTRY_COMPARE(model->count(), 2);
+ model->setXml("");
+
QSignalSpy spyInsert(model, SIGNAL(itemsInserted(int,int)));
QSignalSpy spyRemove(model, SIGNAL(itemsRemoved(int,int)));
QSignalSpy spyCount(model, SIGNAL(countChanged()));
@@ -448,18 +455,16 @@ void tst_qdeclarativexmllistmodel::noKeysValueChanges()
model->setXml(xml);
// wait for the new xml data to be set, and verify no signals were emitted
- for (int i=0; i<50; i++) {
- QTest::qWait(100);
- if (model->data(0, model->roles()[2]).toString() != QLatin1String("AussieRules"))
- break;
- }
+ QTRY_VERIFY(model->data(0, model->roles()[2]).toString() != QLatin1String("Football"));
QCOMPARE(model->data(0, model->roles()[2]).toString(), QLatin1String("AussieRules"));
QVERIFY(spyInsert.count() == 0);
QVERIFY(spyRemove.count() == 0);
QVERIFY(spyCount.count() == 0);
-
+
QCOMPARE(model->count(), 2);
+
+ delete model;
}
void tst_qdeclarativexmllistmodel::keysChanged()
@@ -476,6 +481,8 @@ void tst_qdeclarativexmllistmodel::keysChanged()
model->setXml(xml);
QTRY_COMPARE(model->count(), 2);
+ model->setXml("");
+
QSignalSpy spyInsert(model, SIGNAL(itemsInserted(int,int)));
QSignalSpy spyRemove(model, SIGNAL(itemsRemoved(int,int)));
QSignalSpy spyCount(model, SIGNAL(countChanged()));
@@ -494,6 +501,73 @@ void tst_qdeclarativexmllistmodel::keysChanged()
QCOMPARE(spyRemove[0][1].toInt(), 2);
QCOMPARE(spyCount.count(), 0);
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::propertyChanges()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 9);
+
+ QDeclarativeXmlListModelRole *role = model->findChild<QDeclarativeXmlListModelRole*>("role");
+ QVERIFY(role);
+
+ QSignalSpy nameSpy(role, SIGNAL(nameChanged()));
+ QSignalSpy querySpy(role, SIGNAL(queryChanged()));
+ QSignalSpy isKeySpy(role, SIGNAL(isKeyChanged()));
+
+ role->setName("size");
+ role->setQuery("size/string()");
+ role->setIsKey(true);
+
+ QCOMPARE(role->name(), QString("size"));
+ QCOMPARE(role->query(), QString("size/string()"));
+ QVERIFY(role->isKey());
+
+ QCOMPARE(nameSpy.count(),1);
+ QCOMPARE(querySpy.count(),1);
+ QCOMPARE(isKeySpy.count(),1);
+
+ role->setName("size");
+ role->setQuery("size/string()");
+ role->setIsKey(true);
+
+ QCOMPARE(nameSpy.count(),1);
+ QCOMPARE(querySpy.count(),1);
+ QCOMPARE(isKeySpy.count(),1);
+
+ QSignalSpy sourceSpy(model, SIGNAL(sourceChanged()));
+ QSignalSpy xmlSpy(model, SIGNAL(xmlChanged()));
+ QSignalSpy modelQuerySpy(model, SIGNAL(queryChanged()));
+ QSignalSpy namespaceDeclarationsSpy(model, SIGNAL(namespaceDeclarationsChanged()));
+
+ model->setSource(QUrl(""));
+ model->setXml("<Pets><Pet><name>Polly</name><type>Parrot</type><age>12</age><size>Small</size></Pet></Pets>");
+ model->setQuery("/Pets");
+ model->setNamespaceDeclarations("declare namespace media=\"http://search.yahoo.com/mrss/\";");
+
+ QCOMPARE(model->source(), QUrl(""));
+ QCOMPARE(model->xml(), QString("<Pets><Pet><name>Polly</name><type>Parrot</type><age>12</age><size>Small</size></Pet></Pets>"));
+ QCOMPARE(model->query(), QString("/Pets"));
+ QCOMPARE(model->namespaceDeclarations(), QString("declare namespace media=\"http://search.yahoo.com/mrss/\";"));
+
+ QCOMPARE(sourceSpy.count(),1);
+ QCOMPARE(xmlSpy.count(),1);
+ QCOMPARE(modelQuerySpy.count(),1);
+ QCOMPARE(namespaceDeclarationsSpy.count(),1);
+
+ model->setSource(QUrl(""));
+ model->setXml("<Pets><Pet><name>Polly</name><type>Parrot</type><age>12</age><size>Small</size></Pet></Pets>");
+ model->setQuery("/Pets");
+ model->setNamespaceDeclarations("declare namespace media=\"http://search.yahoo.com/mrss/\";");
+
+ QCOMPARE(sourceSpy.count(),1);
+ QCOMPARE(xmlSpy.count(),1);
+ QCOMPARE(modelQuerySpy.count(),1);
+ QCOMPARE(namespaceDeclarationsSpy.count(),1);
}
QTEST_MAIN(tst_qdeclarativexmllistmodel)
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.0.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.0.png
new file mode 100644
index 0000000..7d41abc
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.1.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.1.png
new file mode 100644
index 0000000..16b95ab
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.2.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.2.png
new file mode 100644
index 0000000..7d41abc
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.3.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.3.png
new file mode 100644
index 0000000..800bf12
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.4.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.4.png
new file mode 100644
index 0000000..d0155bb
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.5.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.5.png
new file mode 100644
index 0000000..7d41abc
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.qml b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.qml
new file mode 100644
index 0000000..5718560
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.qml
@@ -0,0 +1,1663 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 32
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 48
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 64
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 80
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 96
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 112
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 128
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 144
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 160
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 176
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 192
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 208
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 224
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 240
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 256
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 272
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 288
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 304
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 320
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 336
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 352
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 368
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 384
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 400
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 416
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 432
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 448
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 464
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 480
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 496
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 512
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 528
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 544
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 560
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 576
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 592
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 608
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 624
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 640
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 656
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 672
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 688
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 704
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 720
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 736
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 752
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 768
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 784
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 800
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 816
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 832
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 848
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 864
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 880
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 896
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 912
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 928
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 944
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 960
+ image: "parentAnimation.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 992
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1008
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1024
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1040
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1056
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1072
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1088
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1104
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1120
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1136
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1152
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1168
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1184
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1200
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1216
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1232
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1248
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1264
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1280
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1296
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1312
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1328
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1344
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1360
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1376
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1392
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1408
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1424
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1440
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1456
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1472
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1488
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1504
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1520
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1536
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1552
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1568
+ hash: "633b5668278295faa57d0cfffe8a29cb"
+ }
+ Frame {
+ msec: 1584
+ hash: "ccbf4505e0f05547d2f7ce874ab941c0"
+ }
+ Frame {
+ msec: 1600
+ hash: "be904489959fa365badb642fa9e85922"
+ }
+ Frame {
+ msec: 1616
+ hash: "de6a97ac6e2677feb223336199cbffe1"
+ }
+ Frame {
+ msec: 1632
+ hash: "997b0a547336a9bb6a67cd9beffe1831"
+ }
+ Frame {
+ msec: 1648
+ hash: "ac9a6e111050b8a7c4492f06c33d3969"
+ }
+ Frame {
+ msec: 1664
+ hash: "7313c0d2ee06e393f486670222c29bb4"
+ }
+ Frame {
+ msec: 1680
+ hash: "24cea420d03d1fdcddb1b9cf5112cbee"
+ }
+ Frame {
+ msec: 1696
+ hash: "764688785eeaa01e9c84821476911edb"
+ }
+ Frame {
+ msec: 1712
+ hash: "b24ae0cb512abfd2606ff9c20a6751bf"
+ }
+ Frame {
+ msec: 1728
+ hash: "f1daed3391f10e27435a54222df8d0ab"
+ }
+ Frame {
+ msec: 1744
+ hash: "99704e182267f2c12d0215b9c03f4d68"
+ }
+ Frame {
+ msec: 1760
+ hash: "143cd9259a41b8af5d41a5b2aaf8de64"
+ }
+ Frame {
+ msec: 1776
+ hash: "b5f0a0f838b5870c162a24cd767f068b"
+ }
+ Frame {
+ msec: 1792
+ hash: "c5c8cdcbfab7466e447eaff582bf7312"
+ }
+ Frame {
+ msec: 1808
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1824
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1840
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1856
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1872
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1888
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1904
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1920
+ image: "parentAnimation.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1952
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1968
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1984
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2000
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2016
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2032
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2048
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2064
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2080
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2096
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2112
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2128
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2144
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2160
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2176
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2192
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2208
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2224
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2240
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2256
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2272
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2288
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2304
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2320
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2336
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2352
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2368
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2384
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2400
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2416
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2432
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2448
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2464
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2480
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2496
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2512
+ hash: "eaeeb8c51d43e3c38ff7dde632d1f9c8"
+ }
+ Frame {
+ msec: 2528
+ hash: "ec0e68c2e7a75fedd1091ce633dadd4f"
+ }
+ Frame {
+ msec: 2544
+ hash: "a5d60efc176dee9083a2d746e7ad8315"
+ }
+ Frame {
+ msec: 2560
+ hash: "48bcbbacf413080247f818e35e496e04"
+ }
+ Frame {
+ msec: 2576
+ hash: "c521af8efa19fbac39119ad75cd469f5"
+ }
+ Frame {
+ msec: 2592
+ hash: "0e74613c67fc9d9acb21a3d382c5efcd"
+ }
+ Frame {
+ msec: 2608
+ hash: "eeb3f4467ebd7ee678c3b7371db28519"
+ }
+ Frame {
+ msec: 2624
+ hash: "9c5b9009a35b74d0ddec8fec85f204bf"
+ }
+ Frame {
+ msec: 2640
+ hash: "aefc70824e23428aebf0a40830a57469"
+ }
+ Frame {
+ msec: 2656
+ hash: "1fa9c23760193b74b0063b4e4c434070"
+ }
+ Frame {
+ msec: 2672
+ hash: "8091700d4729163bd87521385853e608"
+ }
+ Frame {
+ msec: 2688
+ hash: "a13558e609570f9390f20a85d244fa22"
+ }
+ Frame {
+ msec: 2704
+ hash: "7be5e3609bbeb9a2c1df7d52f3953d4d"
+ }
+ Frame {
+ msec: 2720
+ hash: "51c8ae31f858121d86ef09cc9a5c5ef3"
+ }
+ Frame {
+ msec: 2736
+ hash: "84ce8f39207f4b07c2c3323425a8c238"
+ }
+ Frame {
+ msec: 2752
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2768
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2784
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2800
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2816
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2832
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2848
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2864
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2880
+ image: "parentAnimation.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2912
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2928
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2944
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2960
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2976
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2992
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3008
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3024
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3040
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3056
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3072
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3088
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3104
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3120
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3136
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3152
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3168
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3184
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3200
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3216
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3232
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3248
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3264
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3280
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3296
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3312
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3328
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3344
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3360
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3376
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3392
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3408
+ hash: "633b5668278295faa57d0cfffe8a29cb"
+ }
+ Frame {
+ msec: 3424
+ hash: "ccbf4505e0f05547d2f7ce874ab941c0"
+ }
+ Frame {
+ msec: 3440
+ hash: "be904489959fa365badb642fa9e85922"
+ }
+ Frame {
+ msec: 3456
+ hash: "de6a97ac6e2677feb223336199cbffe1"
+ }
+ Frame {
+ msec: 3472
+ hash: "997b0a547336a9bb6a67cd9beffe1831"
+ }
+ Frame {
+ msec: 3488
+ hash: "ac9a6e111050b8a7c4492f06c33d3969"
+ }
+ Frame {
+ msec: 3504
+ hash: "7313c0d2ee06e393f486670222c29bb4"
+ }
+ Frame {
+ msec: 3520
+ hash: "24cea420d03d1fdcddb1b9cf5112cbee"
+ }
+ Frame {
+ msec: 3536
+ hash: "764688785eeaa01e9c84821476911edb"
+ }
+ Frame {
+ msec: 3552
+ hash: "b24ae0cb512abfd2606ff9c20a6751bf"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3568
+ hash: "b24ae0cb512abfd2606ff9c20a6751bf"
+ }
+ Frame {
+ msec: 3584
+ hash: "d7bf1b48f1a03974e7f095468e07f037"
+ }
+ Frame {
+ msec: 3600
+ hash: "a59ab4fe1c22d27b5cdde949cf90e6f4"
+ }
+ Frame {
+ msec: 3616
+ hash: "7c3082720e65b8a6217bf5a5fe4d48c0"
+ }
+ Frame {
+ msec: 3632
+ hash: "350d1ff24fb8fba0ab8a6694d99544b3"
+ }
+ Frame {
+ msec: 3648
+ hash: "81d17a62c33d79ed25968ec47771d292"
+ }
+ Frame {
+ msec: 3664
+ hash: "43fd3ef88bd7a2e5bf4546f088783077"
+ }
+ Frame {
+ msec: 3680
+ hash: "041938ad2e023202db18df28f2329c8f"
+ }
+ Frame {
+ msec: 3696
+ hash: "ec8677eae06cbf77a9508953325b179e"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3712
+ hash: "ec8677eae06cbf77a9508953325b179e"
+ }
+ Frame {
+ msec: 3728
+ hash: "453026339c3901ee286831b4b41088f6"
+ }
+ Frame {
+ msec: 3744
+ hash: "d58a7a41ade691cc0acfb0303bfc3b68"
+ }
+ Frame {
+ msec: 3760
+ hash: "a200b05ef3d7e39e11513fd2f8ff1497"
+ }
+ Frame {
+ msec: 3776
+ hash: "faa1223975acdf2d4b48045d7f2ce445"
+ }
+ Frame {
+ msec: 3792
+ hash: "964d9b80d82d0fe3d3fb328a1661a60e"
+ }
+ Frame {
+ msec: 3808
+ hash: "705871bc384de93100354acb19b371b0"
+ }
+ Frame {
+ msec: 3824
+ hash: "1a4480463adfc5a3d525916b03c2c3ce"
+ }
+ Frame {
+ msec: 3840
+ image: "parentAnimation.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "9a55bdf428f45f02d9c8cf414dcd7754"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3872
+ hash: "9a55bdf428f45f02d9c8cf414dcd7754"
+ }
+ Frame {
+ msec: 3888
+ hash: "0f6d82d02ce7d79a1bdf6bf81791f321"
+ }
+ Frame {
+ msec: 3904
+ hash: "b145b9d299714020686069baec11cb71"
+ }
+ Frame {
+ msec: 3920
+ hash: "5dbf5e4151c01f10cf23b07ca1df56ab"
+ }
+ Frame {
+ msec: 3936
+ hash: "822d4397ac514673ca1015ad05c9b4ac"
+ }
+ Frame {
+ msec: 3952
+ hash: "461d35e865153d22e9a67bb0ffddefb7"
+ }
+ Frame {
+ msec: 3968
+ hash: "676fff498e6879144090d5596056c6c8"
+ }
+ Frame {
+ msec: 3984
+ hash: "854da7ed627237250e20b263f9eb9d90"
+ }
+ Frame {
+ msec: 4000
+ hash: "157ec877797883d329ff329537205d02"
+ }
+ Frame {
+ msec: 4016
+ hash: "613669ca60240fcc490d548fe802390d"
+ }
+ Frame {
+ msec: 4032
+ hash: "803e84f027c773db96f9530511e5fedb"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4048
+ hash: "803e84f027c773db96f9530511e5fedb"
+ }
+ Frame {
+ msec: 4064
+ hash: "f47cfd1f1094b782c08490be2f49c6ed"
+ }
+ Frame {
+ msec: 4080
+ hash: "db5953f3ee4e2db87e33b85464167f74"
+ }
+ Frame {
+ msec: 4096
+ hash: "8313cb750b9abc586a43b9422de08f53"
+ }
+ Frame {
+ msec: 4112
+ hash: "deb390ce992fee85c56733168b4bd1ec"
+ }
+ Frame {
+ msec: 4128
+ hash: "29a1cda3647c49731e9adcd107a2d13c"
+ }
+ Frame {
+ msec: 4144
+ hash: "bfa17a3afa06699107b217df6e4aed43"
+ }
+ Frame {
+ msec: 4160
+ hash: "8e639ef01ab6d8876c3f40adc44928c6"
+ }
+ Frame {
+ msec: 4176
+ hash: "14038aedf42de0ca62d872d317018ee0"
+ }
+ Frame {
+ msec: 4192
+ hash: "c1288465163d44ed40e28f21e0298ea6"
+ }
+ Frame {
+ msec: 4208
+ hash: "d6915f22a905737488d27e8138002f31"
+ }
+ Frame {
+ msec: 4224
+ hash: "5b1621451a5a3af40302603ec31bb8bb"
+ }
+ Frame {
+ msec: 4240
+ hash: "16fd73c0cb615cc717cdc4a6787471c2"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4256
+ hash: "16fd73c0cb615cc717cdc4a6787471c2"
+ }
+ Frame {
+ msec: 4272
+ hash: "db5caf42e11705ecdb2006e1ed6b0c4f"
+ }
+ Frame {
+ msec: 4288
+ hash: "4b7e51e4e9fb1dacb32aac11a4a46ceb"
+ }
+ Frame {
+ msec: 4304
+ hash: "63c93cda9892f733809125991af997b6"
+ }
+ Frame {
+ msec: 4320
+ hash: "0e74613c67fc9d9acb21a3d382c5efcd"
+ }
+ Frame {
+ msec: 4336
+ hash: "58e813a6619828b6c9ec9cf300ff0e2d"
+ }
+ Frame {
+ msec: 4352
+ hash: "181a6e334d745381f091bf1b55fc1690"
+ }
+ Frame {
+ msec: 4368
+ hash: "f25bbc9ddc8cc72036c49d50b45bece8"
+ }
+ Frame {
+ msec: 4384
+ hash: "88e8f0496debfee6bc2426895fe1c3d9"
+ }
+ Frame {
+ msec: 4400
+ hash: "db5953f3ee4e2db87e33b85464167f74"
+ }
+ Frame {
+ msec: 4416
+ hash: "9818a899adb916b6ba5f7537697ef062"
+ }
+ Frame {
+ msec: 4432
+ hash: "3842f40093d70089a4004fb803c05981"
+ }
+ Frame {
+ msec: 4448
+ hash: "be904489959fa365badb642fa9e85922"
+ }
+ Frame {
+ msec: 4464
+ hash: "cbae27751ff0ebce4fcc164564f4cf1b"
+ }
+ Frame {
+ msec: 4480
+ hash: "3a1b468bd3fd747bbe6b069426b170a9"
+ }
+ Frame {
+ msec: 4496
+ hash: "57fbcd580eb1607a2a7526a65842dfeb"
+ }
+ Frame {
+ msec: 4512
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4528
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4544
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4560
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4576
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4592
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4608
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4624
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4640
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4656
+ hash: "633b5668278295faa57d0cfffe8a29cb"
+ }
+ Frame {
+ msec: 4672
+ hash: "ccbf4505e0f05547d2f7ce874ab941c0"
+ }
+ Frame {
+ msec: 4688
+ hash: "be904489959fa365badb642fa9e85922"
+ }
+ Frame {
+ msec: 4704
+ hash: "de6a97ac6e2677feb223336199cbffe1"
+ }
+ Frame {
+ msec: 4720
+ hash: "997b0a547336a9bb6a67cd9beffe1831"
+ }
+ Frame {
+ msec: 4736
+ hash: "ac9a6e111050b8a7c4492f06c33d3969"
+ }
+ Frame {
+ msec: 4752
+ hash: "7313c0d2ee06e393f486670222c29bb4"
+ }
+ Frame {
+ msec: 4768
+ hash: "24cea420d03d1fdcddb1b9cf5112cbee"
+ }
+ Frame {
+ msec: 4784
+ hash: "764688785eeaa01e9c84821476911edb"
+ }
+ Frame {
+ msec: 4800
+ image: "parentAnimation.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "f1daed3391f10e27435a54222df8d0ab"
+ }
+ Frame {
+ msec: 4832
+ hash: "99704e182267f2c12d0215b9c03f4d68"
+ }
+ Frame {
+ msec: 4848
+ hash: "143cd9259a41b8af5d41a5b2aaf8de64"
+ }
+ Frame {
+ msec: 4864
+ hash: "b5f0a0f838b5870c162a24cd767f068b"
+ }
+ Frame {
+ msec: 4880
+ hash: "c5c8cdcbfab7466e447eaff582bf7312"
+ }
+ Frame {
+ msec: 4896
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4912
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4928
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4944
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4960
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4976
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4992
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5008
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5024
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5040
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5056
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5072
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5088
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5104
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5120
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5136
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5152
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5168
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5184
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5200
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5216
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5232
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5248
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5264
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5280
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5296
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5312
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5328
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5344
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5360
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5376
+ hash: "eaeeb8c51d43e3c38ff7dde632d1f9c8"
+ }
+ Frame {
+ msec: 5392
+ hash: "ec0e68c2e7a75fedd1091ce633dadd4f"
+ }
+ Frame {
+ msec: 5408
+ hash: "a5d60efc176dee9083a2d746e7ad8315"
+ }
+ Frame {
+ msec: 5424
+ hash: "48bcbbacf413080247f818e35e496e04"
+ }
+ Frame {
+ msec: 5440
+ hash: "c521af8efa19fbac39119ad75cd469f5"
+ }
+ Frame {
+ msec: 5456
+ hash: "0e74613c67fc9d9acb21a3d382c5efcd"
+ }
+ Frame {
+ msec: 5472
+ hash: "eeb3f4467ebd7ee678c3b7371db28519"
+ }
+ Frame {
+ msec: 5488
+ hash: "9c5b9009a35b74d0ddec8fec85f204bf"
+ }
+ Frame {
+ msec: 5504
+ hash: "aefc70824e23428aebf0a40830a57469"
+ }
+ Frame {
+ msec: 5520
+ hash: "1fa9c23760193b74b0063b4e4c434070"
+ }
+ Frame {
+ msec: 5536
+ hash: "8091700d4729163bd87521385853e608"
+ }
+ Frame {
+ msec: 5552
+ hash: "a13558e609570f9390f20a85d244fa22"
+ }
+ Frame {
+ msec: 5568
+ hash: "7be5e3609bbeb9a2c1df7d52f3953d4d"
+ }
+ Frame {
+ msec: 5584
+ hash: "51c8ae31f858121d86ef09cc9a5c5ef3"
+ }
+ Frame {
+ msec: 5600
+ hash: "84ce8f39207f4b07c2c3323425a8c238"
+ }
+ Frame {
+ msec: 5616
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5632
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5648
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5664
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5680
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5696
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5712
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5728
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5744
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5760
+ image: "parentAnimation.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5792
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5808
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5824
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5840
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5856
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5872
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5888
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5904
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5920
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5936
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5952
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5968
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5984
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6000
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6016
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6032
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6048
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6064
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6080
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6096
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6112
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6128
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6144
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6160
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6176
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6192
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6208
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6224
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6240
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6256
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6272
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/parentAnimation.qml b/tests/auto/declarative/visual/animation/parentAnimation/parentAnimation.qml
new file mode 100644
index 0000000..1833cf0
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/parentAnimation.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+Rectangle {
+ width: 800;
+ height: 480;
+ color: "black";
+
+ Rectangle {
+ id: gr
+ color: "green"
+ width: 100; height: 100
+ }
+
+ MouseRegion {
+ id: mouser
+ anchors.fill: parent
+ }
+
+ Rectangle {
+ id: np
+ x: 300
+ width: 300; height: 300
+ color: "yellow"
+ clip: true
+ Rectangle {
+ color: "red"
+ x: 100; y: 100; height: 100; width: 100
+ }
+
+ }
+
+ Rectangle {
+ id: vp
+ x: 200; y: 200
+ width: 100; height: 100
+ color: "blue"
+ rotation: 45
+ scale: 2
+ }
+
+ states: State {
+ name: "state1"
+ when: mouser.pressed
+ ParentChange {
+ target: gr
+ parent: np
+ x: 100; y: 100; width: 200;
+ }
+ }
+
+ transitions: Transition {
+ reversible: true
+ to: "state1"
+ ParentAnimation {
+ target: gr; via: vp;
+ NumberAnimation { properties: "x,y,rotation,scale,width" }
+ }
+ }
+}
diff --git a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
index bfc2223..7779efc 100644
--- a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
+++ b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
@@ -1,14 +1,14 @@
load(qttest_p4)
HEADERS += \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase_p.h \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject_p.h
+ $$PWD/../../../src/imports/multimedia/qdeclarativeaudio_p.h \
+ $$PWD/../../../src/imports/multimedia/qdeclarativemediabase_p.h \
+ $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject_p.h
SOURCES += \
tst_qdeclarativeaudio.cpp \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio.cpp \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase.cpp \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject.cpp
+ $$PWD/../../../src/imports/multimedia/qdeclarativeaudio.cpp \
+ $$PWD/../../../src/imports/multimedia/qdeclarativemediabase.cpp \
+ $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject.cpp
QT += multimedia declarative
diff --git a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
index 55c7135..d750c69 100644
--- a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
+++ b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
@@ -41,7 +41,7 @@
#include <QtTest/QtTest>
-#include "../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h"
+#include "../../../src/imports/multimedia/qdeclarativeaudio_p.h"
#include <QtGui/qapplication.h>
#include <QtMultimedia/qmediaplayercontrol.h>
diff --git a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
index 497ee0e..4cd4c71 100644
--- a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
+++ b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
@@ -1,14 +1,14 @@
load(qttest_p4)
HEADERS += \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase_p.h \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject_p.h
+ $$PWD/../../../src/imports/multimedia/qdeclarativevideo_p.h \
+ $$PWD/../../../src/imports/multimedia/qdeclarativemediabase_p.h \
+ $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject_p.h
SOURCES += \
tst_qdeclarativevideo.cpp \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo.cpp \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase.cpp \
- $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject.cpp
+ $$PWD/../../../src/imports/multimedia/qdeclarativevideo.cpp \
+ $$PWD/../../../src/imports/multimedia/qdeclarativemediabase.cpp \
+ $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject.cpp
QT += multimedia declarative
diff --git a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
index d3bfc38..5fd3675 100644
--- a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
+++ b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
@@ -41,7 +41,7 @@
#include <QtTest/QtTest>
-#include "../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h"
+#include "../../../src/imports/multimedia/qdeclarativevideo_p.h"
#include <QtGui/qapplication.h>
#include <QtMultimedia/qabstractvideosurface.h>