aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickanimatedimage
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-06-04 09:01:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-04 10:52:15 +0200
commitd9df24ef35e70b8bb866448c30eaacf188de57f5 (patch)
tree303052f7c8d231886c34bfdb7fcca3693203a852 /tests/auto/quick/qquickanimatedimage
parentcf737d265f0d507ae8e5a909a7b7d43a4aae7de3 (diff)
Stabilize tst_qquickanimatedimage::mirror_notRunning()
Task-number: QTBUG-31370 Change-Id: I200d94dccd1314c891df92576b0d2b704e530e16 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Diffstat (limited to 'tests/auto/quick/qquickanimatedimage')
-rw-r--r--tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
index 73474afbd7..0377eaa71d 100644
--- a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
+++ b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
@@ -190,9 +190,6 @@ void tst_qquickanimatedimage::mirror_running()
QImage frame0_expected = frame0.transformed(transform);
QImage frame1_expected = frame1.transformed(transform);
-#ifdef Q_OS_MAC
- QSKIP("QTBUG-31370 - sometimes fails on Mac");
-#endif
QCOMPARE(frame0_flipped, frame0_expected);
QCOMPARE(frame1_flipped, frame1_expected);
@@ -204,29 +201,28 @@ void tst_qquickanimatedimage::mirror_notRunning()
QFETCH(QUrl, fileUrl);
QQuickView window;
+ window.setSource(fileUrl);
window.show();
+ QTRY_VERIFY(window.isExposed());
- window.setSource(fileUrl);
QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(window.rootObject());
QVERIFY(anim);
int width = anim->property("width").toInt();
- QPixmap screenshot = QPixmap::fromImage(window.grabWindow());
+ QImage screenshot = window.grabWindow();
QTransform transform;
transform.translate(width, 0).scale(-1, 1.0);
- QPixmap expected = screenshot.transformed(transform);
+ QImage expected = screenshot.transformed(transform);
int frame = anim->currentFrame();
bool playing = anim->isPlaying();
bool paused = anim->isPlaying();
anim->setProperty("mirror", true);
- screenshot = QPixmap::fromImage(window.grabWindow());
+ screenshot = window.grabWindow();
-#ifdef Q_OS_MAC
- QSKIP("QTBUG-31370 - sometimes fails on Mac");
-#endif
+ screenshot.save("screen.png");
QCOMPARE(screenshot, expected);
// mirroring should not change the current frame or playing status