From ed024294c570b948970b36bc8ad8b303bfeebe4a Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 12 Jan 2017 21:42:57 +0100 Subject: Fix imageSource and svg tests after change to how QtSvg interprets image size These tests were blacklisted after QtSvg/4bd5d6ced07d2d0e643a13e7cebb228c521d2046. in order to integrate qt5.git. Now, fix the tests to match the new behavior, and remove the blacklisting. Task-number: QTBUG-58082 Change-Id: I77abe995095ee52978c5957e49e1547b3af7708b Reviewed-by: Lars Schmertmann Reviewed-by: Shawn Rutledge --- tests/auto/quick/qquickimage/BLACKLIST | 6 ------ tests/auto/quick/qquickimage/tst_qquickimage.cpp | 12 ++++++------ 2 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 tests/auto/quick/qquickimage/BLACKLIST (limited to 'tests/auto/quick/qquickimage') diff --git a/tests/auto/quick/qquickimage/BLACKLIST b/tests/auto/quick/qquickimage/BLACKLIST deleted file mode 100644 index c081228f5e..0000000000 --- a/tests/auto/quick/qquickimage/BLACKLIST +++ /dev/null @@ -1,6 +0,0 @@ -#QTBUG-58082 -[svg] -* -#QTBUG-58082 -[imageSource] -* diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp index d345163db5..0b48c34b92 100644 --- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp +++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp @@ -145,9 +145,9 @@ void tst_qquickimage::imageSource_data() QTest::newRow("remote") << "/colors.png" << 120.0 << 120.0 << true << false << true << ""; QTest::newRow("remote redirected") << "/oldcolors.png" << 120.0 << 120.0 << true << false << false << ""; if (QImageReader::supportedImageFormats().contains("svg")) - QTest::newRow("remote svg") << "/heart.svg" << 550.0 << 500.0 << true << false << false << ""; + QTest::newRow("remote svg") << "/heart.svg" << 595.0 << 841.0 << true << false << false << ""; if (QImageReader::supportedImageFormats().contains("svgz")) - QTest::newRow("remote svgz") << "/heart.svgz" << 550.0 << 500.0 << true << false << false << ""; + QTest::newRow("remote svgz") << "/heart.svgz" << 595.0 << 841.0 << true << false << false << ""; QTest::newRow("remote not found") << "/no-such-file.png" << 0.0 << 0.0 << true << false << true << ":2:1: QML Image: Error transferring {{ServerBaseUrl}}/no-such-file.png - server replied: Not found"; @@ -402,12 +402,12 @@ void tst_qquickimage::svg() component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); - QCOMPARE(obj->width(), 300.0); - QCOMPARE(obj->height(), 273.0); + QCOMPARE(obj->width(), 212.0); + QCOMPARE(obj->height(), 300.0); obj->setSourceSize(QSize(200,200)); - QCOMPARE(obj->width(), 200.0); - QCOMPARE(obj->height(), 182.0); + QCOMPARE(obj->width(), 141.0); + QCOMPARE(obj->height(), 200.0); delete obj; } -- cgit v1.2.3