summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-16 15:54:06 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-18 17:55:03 +0200
commit4453bfcb20a781192870b37f668ebee72b91974e (patch)
treed5849dffb1640d5fff92fcd21f0d0f816dc1ebdb /tests/auto/gui
parent5d5de7a97fa0f6fc4b83403a7c282d180f4e2060 (diff)
Restore -qt-block-indent on <li> elements
Task-number: QTBUG-20877 Change-Id: If049065ed99eaf8ffc85c8ff54d3da892a095795 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
index 4274753c37..0664cd4e61 100644
--- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
+++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
@@ -87,6 +87,7 @@ private slots:
void html_listIndents4();
void html_listIndents5();
void html_listIndents6();
+ void html_listIndents7();
void blockCharFormat();
void blockCharFormatCopied();
void initialBlock();
@@ -756,6 +757,18 @@ void tst_QTextDocumentFragment::html_listIndents6()
QCOMPARE(cursor.blockFormat().indent(), 0);
}
+void tst_QTextDocumentFragment::html_listIndents7()
+{
+ const char html[] = "<ul><li style=\"-qt-block-indent:1;\">Hey</ul>";
+ setHtml(QString::fromLatin1(html));
+ cursor.movePosition(QTextCursor::Start);
+ cursor.movePosition(QTextCursor::NextBlock);
+ QTextList *list = cursor.currentList();
+ QVERIFY(list);
+ QCOMPARE(list->format().indent(), 1);
+ QCOMPARE(cursor.block().blockFormat().indent(), 1);
+}
+
void tst_QTextDocumentFragment::blockCharFormat()
{
const char html[] = "<p style=\"font-style:italic\"><span style=\"font-style:normal\">Test</span></p>";