summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdom
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-09-28 15:00:54 +0200
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-09-28 15:00:54 +0200
commitf3a36a7e59b24bc388ed15372f941bf649bc5ae4 (patch)
tree5486e561a12afc189ad0451c4cadf0f85e105328 /tests/auto/qdom
parentb0885663f2192eb5eb27f8a8032e7e05b19e3736 (diff)
parentf9d6862d13ae38c59ec4a58092c8126620801e0b (diff)
Merge commit 'origin/4.5' into 4.6
Reviewed-by: Joao Conflicts: src/gui/graphicsview/qgraphicsview.cpp src/gui/widgets/qspinbox.cpp tests/auto/qgraphicsview/tst_qgraphicsview.cpp
Diffstat (limited to 'tests/auto/qdom')
-rw-r--r--tests/auto/qdom/tst_qdom.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp
index 79c0cef393..6637202a08 100644
--- a/tests/auto/qdom/tst_qdom.cpp
+++ b/tests/auto/qdom/tst_qdom.cpp
@@ -130,6 +130,8 @@ private slots:
void setContentWhitespace() const;
void setContentWhitespace_data() const;
+ void taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const;
+
void cleanupTestCase() const;
private:
@@ -1897,5 +1899,18 @@ void tst_QDom::setContentWhitespace_data() const
QTest::newRow("") << QString::fromLatin1("\t\t\t\t<?xml version='1.0' ?><e/>") << false;
}
+void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const
+{
+ QString xmlWithUnknownEncoding("<?xml version='1.0' encoding='unknown-encoding'?>"
+ "<foo>"
+ " <bar>How will this sentence be handled?</bar>"
+ "</foo>");
+ QDomDocument d;
+ QVERIFY(d.setContent(xmlWithUnknownEncoding));
+
+ QString dontAssert = d.toString(); // this should not assert
+ QVERIFY(true);
+}
+
QTEST_MAIN(tst_QDom)
#include "tst_qdom.moc"