summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-11-15 17:10:20 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-11-15 17:10:20 (GMT)
commitbfb6d648a548c25cdead72047ef0a712a45832ea (patch)
tree55049a5df2ac4b31e60ac11de3aae8fe38686e09 /tests
parent2e99669b129ab2b6b6c65f1bff0ed6d5b86d1630 (diff)
parent8bbd999fb9284e94a0e7f2205eef6b74740d0412 (diff)
downloadQt-bfb6d648a548c25cdead72047ef0a712a45832ea.zip
Qt-bfb6d648a548c25cdead72047ef0a712a45832ea.tar.gz
Qt-bfb6d648a548c25cdead72047ef0a712a45832ea.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (23 commits) compile with quintptr instead of intptr_t Enable OpenGL scissors test Remove -fno-omit-frame-pointer and -fno-optimize-sibling-calls in mkspecs, add -Wno-psabi Fix for E32User-CBASE 46 Panic when using CActiveSchedulerWait QNAM HTTP: Ignore double content-length headers Don't pack Harfbuzz structs, this causes unaligned access crashes. qmake vcxproj generator: fix description of custom build tools Fix for KERN-EXEC 0 caused by QNetworkAccessManager::get Minor adjustments to merge-request 915 Implement brush transformations for directfb. Add FreeBSD's certificate bundle to the certificates list. SSL internals: upon error, read all errors from OpenSSL Added an example for QTest::touchEvent to the documentation. Push and pop the thread-default context for the current thread Fix compilation by s/intptr_t/quintptr/ qmake vcxproj generator: fix description of custom build tools Minor adjustments to merge-request 915 Implement brush transformations for directfb. Add FreeBSD's certificate bundle to the certificates list. SSL internals: upon error, read all errors from OpenSSL ...
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp2
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp22
2 files changed, 23 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 3dd69da..652404c 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -1566,7 +1566,7 @@ void tst_qdeclarativeecmascript::callQtInvokables()
o.reset();
{
- QString expected = "MyInvokableObject(0x" + QString::number((intptr_t)&o, 16) + ")";
+ QString expected = "MyInvokableObject(0x" + QString::number((quintptr)&o, 16) + ")";
QCOMPARE(engine->evaluate("object.method_QString(object)").isUndefined(), true);
QCOMPARE(o.error(), false);
QCOMPARE(o.invoked(), 11);
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index a986438..41b3e0a 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -301,6 +301,8 @@ private Q_SLOTS:
void httpWithNoCredentialUsage();
+ void qtbug15311doubleContentLength();
+
// NOTE: This test must be last!
void parentingRepliesToTheApp();
};
@@ -4724,6 +4726,26 @@ void tst_QNetworkReply::httpWithNoCredentialUsage()
QCOMPARE(reply->error(), QNetworkReply::AuthenticationRequiredError);
}
+void tst_QNetworkReply::qtbug15311doubleContentLength()
+{
+ QByteArray response("HTTP/1.0 200 OK\r\nContent-Length: 3\r\nServer: bogus\r\nContent-Length: 3\r\n\r\nABC");
+ MiniHttpServer server(response);
+ server.doClose = true;
+
+ QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
+ QNetworkReplyPtr reply = manager.get(request);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(reply->isFinished());
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QCOMPARE(reply->size(), qint64(3));
+ QCOMPARE(reply->header(QNetworkRequest::ContentLengthHeader).toLongLong(), qint64(3));
+ QCOMPARE(reply->rawHeader("Content-length"), QByteArray("3, 3"));
+ QCOMPARE(reply->readAll(), QByteArray("ABC"));
+}
+
// NOTE: This test must be last testcase in tst_qnetworkreply!