aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-08-05 13:47:15 +0200
committerLiang Qi <liang.qi@qt.io>2019-08-05 13:47:15 +0200
commit28ce9711b23cd526c6f5627f750fed840bed2d32 (patch)
tree957378bd2c8a07d60147b963fcf580920fb1581e /tests
parentaeec2f94c376c9a0e84bbbb3be4652384c7da113 (diff)
parent0647df8c88d4eaeedd19456b6e382308208e2be1 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquicktext/data/verticallyAlignedImageInTable.qml14
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp14
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_table_vertically_aligned_image.qml14
3 files changed, 42 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktext/data/verticallyAlignedImageInTable.qml b/tests/auto/quick/qquicktext/data/verticallyAlignedImageInTable.qml
new file mode 100644
index 0000000000..4c00362d15
--- /dev/null
+++ b/tests/auto/quick/qquicktext/data/verticallyAlignedImageInTable.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ Text {
+ anchors.centerIn: parent
+ font.family: "Arial"
+ font.pixelSize: 16
+ textFormat: Text.RichText
+ text: "<table><tr><td/><td valign=\"top\"><img src=\"images/face-sad.png\"></td></tr></table>"
+ }
+}
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index fd0ba0f49b..97107694bd 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -162,6 +162,8 @@ private slots:
void initialContentHeight();
+ void verticallyAlignedImageInTable();
+
private:
QStringList standard;
QStringList richText;
@@ -4415,6 +4417,18 @@ void tst_qquicktext::implicitSizeChangeRewrap()
QVERIFY(text->contentWidth() < window->width());
}
+void tst_qquicktext::verticallyAlignedImageInTable()
+{
+ QScopedPointer<QQuickView> window(new QQuickView);
+ window->setSource(testFileUrl("verticallyAlignedImageInTable.qml"));
+ QTRY_COMPARE(window->status(), QQuickView::Ready);
+
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+
+ // Don't crash
+}
+
QTEST_MAIN(tst_qquicktext)
#include "tst_qquicktext.moc"
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_table_vertically_aligned_image.qml b/tests/manual/scenegraph_lancelot/data/text/text_table_vertically_aligned_image.qml
new file mode 100644
index 0000000000..d712f94572
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_table_vertically_aligned_image.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ Text {
+ anchors.centerIn: parent
+ font.family: "Arial"
+ font.pixelSize: 16
+ textFormat: Text.RichText
+ text: "<table><tr><td/><td valign=\"top\"><img src=\"data/logo.png\"></td></tr></table>"
+ }
+}