summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-09-22 03:56:55 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-09-22 03:56:55 (GMT)
commit1e807fb6b9cc2efa0979ed4cdbf20e89f1d467d0 (patch)
treee6512f8dd1ca0e2dee18f9dc8873410804dadf14 /tests
parentffbfb1571c617f82137cdf1171120b1a67baca12 (diff)
parent90f0facddb799640ef9e123a3fc222e6a758c7be (diff)
downloadQt-1e807fb6b9cc2efa0979ed4cdbf20e89f1d467d0.zip
Qt-1e807fb6b9cc2efa0979ed4cdbf20e89f1d467d0.tar.gz
Qt-1e807fb6b9cc2efa0979ed4cdbf20e89f1d467d0.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp
index 4f3df29..89a1ef5 100644
--- a/tests/auto/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp
@@ -1747,10 +1747,17 @@ void tst_QTextCodec::codecForHtml()
QCOMPARE(QTextCodec::codecForHtml(html)->mibEnum(), 4); // latin 1
- QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 106); // utf-8
+ QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 106); // UTF-8
html = "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-15\" /></head></html>";
QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 111); // latin 15
+
+ html = "<html><head><meta content=\"text/html; charset=ISO-8859-15\" http-equiv=\"content-type\" /></head></html>";
+ QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 111); // latin 15
+
+ html = "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=invalid-foo\" /></head></html>";
+ QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 106); // UTF-8
+ QCOMPARE(QTextCodec::codecForHtml(html)->mibEnum(), 4); // latin 1
}
#ifdef Q_OS_UNIX