aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-01-12 21:42:57 +0100
committerLiang Qi <liang.qi@qt.io>2017-01-15 08:35:58 +0000
commited024294c570b948970b36bc8ad8b303bfeebe4a (patch)
treed8bd43fe26a88af0910b0b285f4f3c00022de64f /tests
parent60300fda463ae0f31c1e66ca253a2a976a88ee20 (diff)
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 <lars.schmertmann@governikus.de> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickimage/BLACKLIST6
-rw-r--r--tests/auto/quick/qquickimage/tst_qquickimage.cpp12
2 files changed, 6 insertions, 12 deletions
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 << "<Unknown File>: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<QQuickImage*>(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;
}