aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-11 16:03:12 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-08-11 16:03:12 +0200
commitf9949f501890a7f8289fcbda85d3a4085bdbb21a (patch)
tree759e57bb3ed156e46a98c3a4223951c3edc55d43 /tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
parent1ddef09c351f2899b1662ddd1de190c0d0a8b7bf (diff)
parent3e0c19d5ba0e4826c3f036c3172d8ea0e30530a6 (diff)
Merge branch 'master' into refactor
Conflicts: src/declarative/declarative.pro src/imports/gestures/gestures.pro src/imports/inputcontext/inputcontext.pro src/qtquick1/graphicsitems/qdeclarativeitem.cpp src/qtquick1/qtquick1.pro Change-Id: I782be7090d8b6da9c890bc8e778722da93da8037
Diffstat (limited to 'tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index 9308aca208..bd9c3e0d7a 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -89,6 +89,8 @@ private slots:
void doubleRegistrationBug();
void alwaysRunToEndRestartBug();
void transitionAssignmentBug();
+ void pauseBindingBug();
+ void pauseBug();
};
#define QTIMED_COMPARE(lhs, rhs) do { \
@@ -857,6 +859,35 @@ void tst_qdeclarativeanimations::transitionAssignmentBug()
QCOMPARE(rect->property("nullObject").toBool(), false);
}
+//QTBUG-19080
+void tst_qdeclarativeanimations::pauseBindingBug()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/pauseBindingBug.qml");
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
+ QVERIFY(rect != 0);
+ QDeclarativeAbstractAnimation *anim = rect->findChild<QDeclarativeAbstractAnimation*>("animation");
+ QVERIFY(anim->qtAnimation()->state() == QAbstractAnimation::Paused);
+
+ delete rect;
+}
+
+//QTBUG-13598
+void tst_qdeclarativeanimations::pauseBug()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/pauseBug.qml");
+ QDeclarativeAbstractAnimation *anim = qobject_cast<QDeclarativeAbstractAnimation*>(c.create());
+ QVERIFY(anim != 0);
+ QCOMPARE(anim->qtAnimation()->state(), QAbstractAnimation::Paused);
+ QCOMPARE(anim->isPaused(), true);
+ QCOMPARE(anim->isRunning(), true);
+
+ delete anim;
+}
+
QTEST_MAIN(tst_qdeclarativeanimations)
#include "tst_qdeclarativeanimations.moc"