diff options
Diffstat (limited to 'tests/auto/qmovie')
-rw-r--r-- | tests/auto/qmovie/animations/corrupt.gif | bin | 0 -> 847 bytes | |||
-rw-r--r-- | tests/auto/qmovie/qmovie.pro | 1 | ||||
-rw-r--r-- | tests/auto/qmovie/resources.qrc | 5 | ||||
-rw-r--r-- | tests/auto/qmovie/tst_qmovie.cpp | 15 |
4 files changed, 20 insertions, 1 deletions
diff --git a/tests/auto/qmovie/animations/corrupt.gif b/tests/auto/qmovie/animations/corrupt.gif Binary files differnew file mode 100644 index 0000000..c1545eb --- /dev/null +++ b/tests/auto/qmovie/animations/corrupt.gif diff --git a/tests/auto/qmovie/qmovie.pro b/tests/auto/qmovie/qmovie.pro index 6973955..855eb9e 100644 --- a/tests/auto/qmovie/qmovie.pro +++ b/tests/auto/qmovie/qmovie.pro @@ -12,6 +12,7 @@ wince*: { DEPLOYMENT += addFiles } +RESOURCES += resources.qrc symbian: { addFiles.files = animations\\* diff --git a/tests/auto/qmovie/resources.qrc b/tests/auto/qmovie/resources.qrc new file mode 100644 index 0000000..ce459a0 --- /dev/null +++ b/tests/auto/qmovie/resources.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>animations/corrupt.gif</file> +</qresource> +</RCC> diff --git a/tests/auto/qmovie/tst_qmovie.cpp b/tests/auto/qmovie/tst_qmovie.cpp index 80a551b..8278bbf 100644 --- a/tests/auto/qmovie/tst_qmovie.cpp +++ b/tests/auto/qmovie/tst_qmovie.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -72,6 +72,7 @@ private slots: void jumpToFrame_data(); void jumpToFrame(); void changeMovieFile(); + void infiniteLoop(); }; // Testing get/set functions @@ -208,5 +209,17 @@ void tst_QMovie::changeMovieFile() QVERIFY(movie.currentFrameNumber() == -1); } +void tst_QMovie::infiniteLoop() +{ + QLabel label; + label.show(); + QMovie *movie = new QMovie(QLatin1String(":animations/corrupt.gif"), QByteArray(), &label); + label.setMovie(movie); + movie->start(); + + QTestEventLoop::instance().enterLoop(1); + QTestEventLoop::instance().timeout(); +} + QTEST_MAIN(tst_QMovie) #include "tst_qmovie.moc" |