diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-09-28 13:00:54 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-09-28 13:00:54 (GMT) |
commit | f3a36a7e59b24bc388ed15372f941bf649bc5ae4 (patch) | |
tree | 5486e561a12afc189ad0451c4cadf0f85e105328 /tests/auto/qdom/tst_qdom.cpp | |
parent | b0885663f2192eb5eb27f8a8032e7e05b19e3736 (diff) | |
parent | f9d6862d13ae38c59ec4a58092c8126620801e0b (diff) | |
download | Qt-f3a36a7e59b24bc388ed15372f941bf649bc5ae4.zip Qt-f3a36a7e59b24bc388ed15372f941bf649bc5ae4.tar.gz Qt-f3a36a7e59b24bc388ed15372f941bf649bc5ae4.tar.bz2 |
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/tst_qdom.cpp')
-rw-r--r-- | tests/auto/qdom/tst_qdom.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp index 79c0cef..6637202 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" |