summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcssparser
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-02 14:49:33 +0100
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-02 15:08:28 +0100
commit8d01f436451071a917c147a96a979ccdaee106f9 (patch)
tree43972bf16252189e05969ff5c6c6b97edf9f2b54 /tests/auto/qcssparser
parente6da35f6055d3ae7acf38d89456d3047f055a9cd (diff)
QCSSParser: Fixes the way spaces are handled in font family.
We cannot simplify spaces because a font may have several spaces in its name. If we only add spaces when needed when merging tokens, we don't need to simplyfy the string later The CSS tokenizer will already make sure that spaces are removed if there is no quotes (btw, the CSS specification says that there must be quotes if there is spaces, but we tollerate if there is no quotes) Reviewed-by: Jocelyn Turcotte Task-number: QTBUG-4344 Task-number: 258586
Diffstat (limited to 'tests/auto/qcssparser')
-rw-r--r--tests/auto/qcssparser/tst_qcssparser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qcssparser/tst_qcssparser.cpp b/tests/auto/qcssparser/tst_qcssparser.cpp
index 150f131f02..3580252c7f 100644
--- a/tests/auto/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/qcssparser/tst_qcssparser.cpp
@@ -1556,8 +1556,11 @@ void tst_QCssParser::extractFontFamily_data()
QTest::newRow("shorthand") << "font: 12pt Times New Roman" << QString("Times New Roman");
QTest::newRow("shorthand multiple quote") << "font: 12pt invalid, \"Times New Roman\" " << QString("Times New Roman");
QTest::newRow("shorthand multiple") << "font: 12pt invalid, Times New Roman " << QString("Times New Roman");
+ QTest::newRow("invalid spaces") << "font-family: invalid spaces, Times New Roman " << QString("Times New Roman");
+ QTest::newRow("invalid spaces quotes") << "font-family: 'invalid spaces', 'Times New Roman' " << QString("Times New Roman");
}
+
void tst_QCssParser::extractFontFamily()
{
QFETCH(QString, css);