summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-06-22 22:36:13 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-06-22 22:36:13 (GMT)
commit27d59016d35ae84d89e8d09bdadb1c3a89ac3f22 (patch)
treef493da0591281db183c23c86ecc3dc078009cafa /tests
parentb92a7337d47e8b1be2d65d5a726f7a6f291a65bb (diff)
parent5d3b132dd94f6c985fa3f9584dedb46823acddfe (diff)
downloadQt-27d59016d35ae84d89e8d09bdadb1c3a89ac3f22.zip
Qt-27d59016d35ae84d89e8d09bdadb1c3a89ac3f22.tar.gz
Qt-27d59016d35ae84d89e8d09bdadb1c3a89ac3f22.tar.bz2
Merge remote branch 'origin/4.7' into qml-4.7
Conflicts: examples/declarative/modelviews/webview/transparent.qml
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/headers/tst_headers.cpp2
-rw-r--r--tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp2
-rw-r--r--tests/auto/qtextdocument/tst_qtextdocument.cpp22
-rw-r--r--tests/auto/qtextstream/test/test.pro1
4 files changed, 23 insertions, 4 deletions
diff --git a/tests/auto/headers/tst_headers.cpp b/tests/auto/headers/tst_headers.cpp
index 0538607..06c70f9 100644
--- a/tests/auto/headers/tst_headers.cpp
+++ b/tests/auto/headers/tst_headers.cpp
@@ -79,7 +79,7 @@ private:
tst_Headers::tst_Headers() :
copyrightPattern("\\*\\* Copyright \\(C\\) 20[0-9][0-9] Nokia Corporation and/or its subsidiary\\(-ies\\)."),
- licensePattern("\\*\\* \\$QT_BEGIN_LICENSE:(LGPL|BSD|3RDPARTY|LGPL-ONLY)\\$"),
+ licensePattern("\\*\\* \\$QT_BEGIN_LICENSE:(LGPL|BSD|3RDPARTY|LGPL-ONLY|FDL)\\$"),
moduleTest(QLatin1String("\\*\\* This file is part of the .+ of the Qt Toolkit."))
{
}
diff --git a/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index 5bbe8f6..245a5c6 100644
--- a/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -642,7 +642,7 @@ void tst_QNetworkDiskCache::crashWhenParentingCache()
QNetworkAccessManager *manager = new QNetworkAccessManager();
QNetworkDiskCache *diskCache = new QNetworkDiskCache(manager); // parent to qnam!
// we expect the temp dir to be cleaned at some point anyway
- diskCache->setCacheDirectory(QDir::tempPath() + "/cacheDir_" + QCoreApplication::applicationPid());
+ diskCache->setCacheDirectory(QString("%1/cacheDir_%2").arg(QDir::tempPath()).arg(QCoreApplication::applicationPid()));
manager->setCache(diskCache);
QUrl url("http://127.0.0.1:" + QString::number(server.serverPort()));
diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp
index 51aee74..808299b 100644
--- a/tests/auto/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp
@@ -98,6 +98,7 @@ private slots:
void noundo_isModified2();
void noundo_isModified3();
void mightBeRichText();
+ void mightBeRichText_data();
void task240325();
@@ -679,13 +680,32 @@ void tst_QTextDocument::noundo_isModified3()
QVERIFY(doc->isModified());
}
-void tst_QTextDocument::mightBeRichText()
+void tst_QTextDocument::mightBeRichText_data()
{
const char qtDocuHeader[] = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"
"<!DOCTYPE html\n"
" PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">";
QVERIFY(Qt::mightBeRichText(QString::fromLatin1(qtDocuHeader)));
+ QTest::addColumn<QString>("input");
+ QTest::addColumn<bool>("result");
+
+ QTest::newRow("documentation-header") << QString("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"
+ "<!DOCTYPE html\n"
+ " PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">\n"
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">")
+ << true;
+ QTest::newRow("br-nospace") << QString("Test <br/> new line") << true;
+ QTest::newRow("br-space") << QString("Test <br /> new line") << true;
+ QTest::newRow("br-invalidspace") << QString("Test <br/ > new line") << false;
+ QTest::newRow("invalid closing tag") << QString("Test <br/ line") << false;
+}
+
+void tst_QTextDocument::mightBeRichText()
+{
+ QFETCH(QString, input);
+ QFETCH(bool, result);
+ QVERIFY(result == Qt::mightBeRichText(input));
}
Q_DECLARE_METATYPE(QTextDocumentFragment)
diff --git a/tests/auto/qtextstream/test/test.pro b/tests/auto/qtextstream/test/test.pro
index c70c27b..20823de 100644
--- a/tests/auto/qtextstream/test/test.pro
+++ b/tests/auto/qtextstream/test/test.pro
@@ -28,7 +28,6 @@ wince*|symbian: {
wince*: {
DEFINES += SRCDIR=\\\"\\\"
}else:symbian {
- load(data_caging_paths)
# Symbian can't define SRCDIR meaningfully here
qt_not_deployed {
codecs_plugins.sources = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll