diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-27 16:01:16 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-27 16:01:26 (GMT) |
commit | 56c8393c5830045f599a22edbe4fd17c18dc827d (patch) | |
tree | 0bda8c988706930beab2c204a1447092a43d7741 /tests/auto | |
parent | 71c2cfee4bcd81b2552b66b676895dcd9a6a794b (diff) | |
parent | f93097671f512f38790ba2d56bd5b1e037810266 (diff) | |
download | Qt-56c8393c5830045f599a22edbe4fd17c18dc827d.zip Qt-56c8393c5830045f599a22edbe4fd17c18dc827d.tar.gz Qt-56c8393c5830045f599a22edbe4fd17c18dc827d.tar.bz2 |
Merge commit 'upstream/4.6' into oslo-staging-2/4.6
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/networkselftest/tst_networkselftest.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qdbusconnection/tst_qdbusconnection.cpp | 66 | ||||
-rw-r--r-- | tests/auto/qftp/tst_qftp.cpp | 21 | ||||
-rw-r--r-- | tests/auto/qhttp/tst_qhttp.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp | 60 | ||||
-rw-r--r-- | tests/auto/qtcpserver/tst_qtcpserver.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qtextedit/tst_qtextedit.cpp | 19 | ||||
-rw-r--r-- | tests/auto/qudpsocket/tst_qudpsocket.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref | 7 | ||||
-rw-r--r-- | tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml | 3 |
12 files changed, 158 insertions, 38 deletions
diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index f13bcad..b9be5cb 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -156,7 +156,7 @@ static QString prettyByteArray(const QByteArray &array) return result; } -static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout = 2000) +static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout = 4000) { QTime timer; timer.start(); @@ -171,7 +171,7 @@ static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout } } -static bool doSocketFlush(QTcpSocket *socket, int timeout = 2000) +static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000) { #ifndef QT_NO_OPENSSL QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket); diff --git a/tests/auto/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/qdbusconnection/tst_qdbusconnection.cpp index bb034a3..c1976c0 100644 --- a/tests/auto/qdbusconnection/tst_qdbusconnection.cpp +++ b/tests/auto/qdbusconnection/tst_qdbusconnection.cpp @@ -96,6 +96,8 @@ private slots: void registerQObjectChildren(); void callSelf(); + void callSelfByAnotherName_data(); + void callSelfByAnotherName(); void multipleInterfacesInQObject(); void slotsWithLessParameters(); @@ -493,6 +495,70 @@ void tst_QDBusConnection::callSelf() QCOMPARE(reply.arguments().value(0).toInt(), 45); } +void tst_QDBusConnection::callSelfByAnotherName_data() +{ + QTest::addColumn<int>("registerMethod"); + QTest::newRow("connection") << 0; + QTest::newRow("connection-interface") << 1; + QTest::newRow("direct") << 2; +} + +void tst_QDBusConnection::callSelfByAnotherName() +{ + static int counter = 0; + QString sname = serviceName() + QString::number(counter++); + + QDBusConnection con = QDBusConnection::sessionBus(); + QVERIFY(con.isConnected()); + + TestObject testObject; + QVERIFY(con.registerObject("/test", &testObject, + QDBusConnection::ExportAllContents)); + con.connect("org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "NameOwnerChanged", + QStringList() << sname << "", + QString(), &QTestEventLoop::instance(), SLOT(exitLoop())); + + // register the name + QFETCH(int, registerMethod); + switch (registerMethod) { + case 0: + QVERIFY(con.registerService(sname)); + break; + + case 1: + QVERIFY(con.interface()->registerService(sname).value() == QDBusConnectionInterface::ServiceRegistered); + break; + + case 2: { + // flag is DBUS_NAME_FLAG_DO_NOT_QUEUE = 0x04 + // reply is DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER = 1 + QDBusReply<uint> reply = con.interface()->call("RequestName", sname, 4u); + QVERIFY(reply.value() == 1); + } + } + + struct Deregisterer { + QDBusConnection con; + QString sname; + Deregisterer(const QDBusConnection &con, const QString &sname) : con(con), sname(sname) {} + ~Deregisterer() { con.interface()->unregisterService(sname); } + } deregisterer(con, sname); + + // give the connection a chance to find out that we're good to go + QTestEventLoop::instance().enterLoop(2); + con.disconnect("org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "NameOwnerChanged", + QStringList() << sname << "", + QString(), &QTestEventLoop::instance(), SLOT(exitLoop())); + QVERIFY(!QTestEventLoop::instance().timeout()); + + // make the call + QDBusMessage msg = QDBusMessage::createMethodCall(sname, "/test", + QString(), "test0"); + QDBusMessage reply = con.call(msg, QDBus::Block, 1000); + + QVERIFY(reply.type() == QDBusMessage::ReplyMessage); +} + void tst_QDBusConnection::multipleInterfacesInQObject() { QDBusConnection con = QDBusConnection::sessionBus(); diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp index 1e7f424..27c2e13 100644 --- a/tests/auto/qftp/tst_qftp.cpp +++ b/tests/auto/qftp/tst_qftp.cpp @@ -618,7 +618,7 @@ void tst_QFtp::get() } addCommand( QFtp::Close, ftp->close() ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); delete ftp; if ( QTestEventLoop::instance().timeout() ) QFAIL( "Network operation timed out" ); @@ -1020,7 +1020,7 @@ void tst_QFtp::renameInit( const QString &host, const QString &user, const QStri addCommand( QFtp::Put, ftp->put( QByteArray(), createFile ) ); addCommand( QFtp::Close, ftp->close() ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); delete ftp; if ( QTestEventLoop::instance().timeout() ) QFAIL( "Network operation timed out" ); @@ -1295,14 +1295,18 @@ void tst_QFtp::abort_data() // Qt/CE and Symbian test environment has to less memory for this test #if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) QByteArray bigData( 10*1024*1024, 0 ); +#else + QByteArray bigData( 1*1024*1024, 0 ); +#endif bigData.fill( 'B' ); - QTest::newRow( "put_fluke01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/upload/abort_put") << bigData; -#endif } void tst_QFtp::abort() { + // In case you wonder where the abort() actually happens, look into + // tst_QFtp::dataTransferProgress + // QFETCH( QString, host ); QFETCH( uint, port ); QFETCH( QString, file ); @@ -1324,7 +1328,7 @@ void tst_QFtp::abort() addCommand( QFtp::Close, ftp->close() ); for(int time = 0; time <= uploadData.length() / 30000; time += 30) { - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); if(ftp->currentCommand() == QFtp::None) break; } @@ -1404,7 +1408,7 @@ void tst_QFtp::bytesAvailable() if ( type != 0 ) addCommand( QFtp::Close, ftp->close() ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 40 ); if ( QTestEventLoop::instance().timeout() ) QFAIL( "Network operation timed out" ); @@ -1493,7 +1497,7 @@ void tst_QFtp::proxy() addCommand( QFtp::Cd, ftp->cd( dir ) ); addCommand( QFtp::List, ftp->list() ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); delete ftp; if ( QTestEventLoop::instance().timeout() ) { @@ -1921,7 +1925,7 @@ bool tst_QFtp::fileExists( const QString &host, quint16 port, const QString &use delete ftp; if ( QTestEventLoop::instance().timeout() ) { // ### make this test work - qWarning("Network operation timed out"); + qWarning("tst_QFtp::fileExists: Network operation timed out"); return FALSE; } inFileDirExistsFunction = FALSE; @@ -1972,6 +1976,7 @@ bool tst_QFtp::dirExists( const QString &host, quint16 port, const QString &user if ( QTestEventLoop::instance().timeout() ) { // ### make this test work // QFAIL( "Network operation timed out" ); + qWarning("tst_QFtp::dirExists: Network operation timed out"); return FALSE; } inFileDirExistsFunction = FALSE; diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp index 0ea0d15..b4b6ceb 100644 --- a/tests/auto/qhttp/tst_qhttp.cpp +++ b/tests/auto/qhttp/tst_qhttp.cpp @@ -363,7 +363,7 @@ void tst_QHttp::get() } addRequest( QHttpRequestHeader(), getId ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); if ( QTestEventLoop::instance().timeout() ) QFAIL( "Network operation timed out" ); diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index 5ead049..8cabadb 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -695,7 +695,7 @@ public: || socket.error() == QLocalSocket::ConnectionRefusedError) && tries < 1000); if (tries == 0 && socket.state() != QLocalSocket::ConnectedState) { - QVERIFY(socket.waitForConnected(3000)); + QVERIFY(socket.waitForConnected(7000)); QVERIFY(socket.state() == QLocalSocket::ConnectedState); } @@ -725,7 +725,7 @@ public: int done = clients; while (done > 0) { bool timedOut = true; - QVERIFY(server.waitForNewConnection(3000, &timedOut)); + QVERIFY(server.waitForNewConnection(7000, &timedOut)); QVERIFY(!timedOut); QLocalSocket *serverSocket = server.nextPendingConnection(); QVERIFY(serverSocket); diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index bd83c47..5fe716a 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2212,7 +2212,7 @@ void tst_QNetworkReply::ioGetWithManyProxies() connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), SLOT(sslErrors(QNetworkReply*,QList<QSslError>))); #endif - QTestEventLoop::instance().enterLoop(10); + QTestEventLoop::instance().enterLoop(15); QVERIFY(!QTestEventLoop::instance().timeout()); manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), @@ -2622,7 +2622,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocket() QSignalSpy authenticationRequiredSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*))); QSignalSpy proxyAuthenticationRequiredSpy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); - QTestEventLoop::instance().enterLoop(6); + QTestEventLoop::instance().enterLoop(12); disconnect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index 77ccdb3..1a02785 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -85,6 +85,7 @@ private slots: void functionEntryAndExit_native(); void functionEntryAndExit_native2(); void functionEntryAndExit_nativeThrowing(); + void functionEntryAndExit_builtin_data(); void functionEntryAndExit_builtin(); void functionEntryAndExit_objects(); void functionEntryAndExit_slots(); @@ -476,7 +477,7 @@ void tst_QScriptEngineAgent::scriptLoadAndUnload_eval() spy->clear(); eng.evaluate("eval('function foo() { print(123); }')"); - QEXPECT_FAIL("","Eval is threaded in different way that in old backend", Abort); + QEXPECT_FAIL("","QTBUG-6140 Eval is threaded in different way that in old backend", Abort); QCOMPARE(spy->count(), 3); QCOMPARE(spy->at(0).type, ScriptEngineEvent::ScriptLoad); @@ -811,18 +812,42 @@ void tst_QScriptEngineAgent::functionEntryAndExit_nativeThrowing() delete spy; } +void tst_QScriptEngineAgent::functionEntryAndExit_builtin_data() +{ + QTest::addColumn<QString>("script"); + QTest::addColumn<QString>("result"); + + QTest::newRow("string native") << "'ciao'.toString()" << "ciao"; + QTest::newRow("string object") << "String('ciao').toString()" << "ciao"; + QTest::newRow("number native") << "(123).toString()" << "123"; + QTest::newRow("number object") << "Number(123).toString()" << "123"; + QTest::newRow("array native") << "['s','a'].toString()" << "s, a"; + QTest::newRow("array object") << "Array('s', 'a').toString()" << "s,a"; + QTest::newRow("boolean native") << "false.toString()" << "false"; + QTest::newRow("boolean object") << "Boolean(true).toString()" << "true"; + QTest::newRow("regexp native") << "/a/.toString()" << "/a/"; + QTest::newRow("regexp object") << "RegExp('a').toString()" << "/a/"; +} + /** check behaiviour of built-in function */ void tst_QScriptEngineAgent::functionEntryAndExit_builtin() { + QFETCH(QString, script); + QFETCH(QString, result); QScriptEngine eng; ScriptEngineSpy *spy = new ScriptEngineSpy(&eng, ~(ScriptEngineSpy::IgnoreFunctionEntry | ScriptEngineSpy::IgnoreFunctionExit)); { spy->clear(); - eng.evaluate("'ciao'.toString()"); - - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "Some events are missing when JIT is enabled", Abort); + eng.evaluate(script); + + if (qt_script_isJITEnabled()) { + QEXPECT_FAIL("string native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + QEXPECT_FAIL("number native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + QEXPECT_FAIL("array native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + QEXPECT_FAIL("boolean native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + QEXPECT_FAIL("regexp native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + } QCOMPARE(spy->count(), 4); // evaluate() entry @@ -835,14 +860,13 @@ void tst_QScriptEngineAgent::functionEntryAndExit_builtin() // built-in native function exit QCOMPARE(spy->at(2).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(2).scriptId, qint64(-1)); - QVERIFY(spy->at(2).value.isString()); - QCOMPARE(spy->at(2).value.toString(), QString("ciao")); + QCOMPARE(spy->at(2).value.toString(), QString(result)); // evaluate() exit QCOMPARE(spy->at(3).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(3).scriptId, spy->at(0).scriptId); QVERIFY(spy->at(3).value.isString()); - QCOMPARE(spy->at(3).value.toString(), QString("ciao")); + QCOMPARE(spy->at(3).value.toString(), QString(result)); } delete spy; } @@ -1161,16 +1185,16 @@ void tst_QScriptEngineAgent::positionChange_1() { spy->clear(); eng.evaluate(";"); - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QCOMPARE(spy->count(), 1); if (spy->count()) { - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QCOMPARE(spy->at(0).type, ScriptEngineEvent::PositionChange); - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QVERIFY(spy->at(0).scriptId != -1); - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QCOMPARE(spy->at(0).lineNumber, 1); - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QCOMPARE(spy->at(0).columnNumber, 1); } } @@ -1552,7 +1576,7 @@ void tst_QScriptEngineAgent::positionChange_2() } { - QEXPECT_FAIL("","I believe the test is wrong. Expressions shouldn't call positionChange " + QEXPECT_FAIL("","QTBUG-6142 I believe the test is wrong. Expressions shouldn't call positionChange " "because statement '1+2' will call it at least twice, why debugger have to " "stop here so many times?", Abort); spy->clear(); @@ -2089,8 +2113,6 @@ void tst_QScriptEngineAgent::syntaxError() i = 2; QCOMPARE(spy->at(i).type, ScriptEngineEvent::ContextPush); - QEXPECT_FAIL("","The test is broken, contextPush event do not provide scriptId", Continue); - QVERIFY(spy->at(i).scriptId == -1); i = 3; QCOMPARE(spy->at(i).type, ScriptEngineEvent::FunctionEntry); QVERIFY(spy->at(i).scriptId == -1); @@ -2099,14 +2121,12 @@ void tst_QScriptEngineAgent::syntaxError() QVERIFY(spy->at(i).scriptId == -1); i = 5; QCOMPARE(spy->at(i).type, ScriptEngineEvent::ContextPop); - QEXPECT_FAIL("","The test is broken, contextPop event do not provide scriptId", Continue); - QVERIFY(spy->at(i).scriptId == -1); i = 6; QCOMPARE(spy->at(i).type, ScriptEngineEvent::ExceptionThrow); QCOMPARE(spy->at(i).scriptId, spy->at(0).scriptId); QVERIFY(!spy->at(i).hasExceptionHandler); QVERIFY(spy->at(i).value.isError()); - QEXPECT_FAIL("","There are other messages in JSC",Continue); + QEXPECT_FAIL("","QTBUG-6137 There are other messages in JSC",Continue); QCOMPARE(spy->at(i).value.toString(), QString("SyntaxError: Expected `}'")); QCOMPARE(spy->at(i).scriptId, spy->at(0).scriptId); i = 7; @@ -2139,7 +2159,7 @@ void tst_QScriptEngineAgent::extension_invoctaion() QCOMPARE(spy->at(1).lineNumber, lineNumber); QCOMPARE(spy->at(1).columnNumber, 1); - QEXPECT_FAIL("","In JSC Eval('debugger') returns undefined",Abort); + QEXPECT_FAIL("","QTBUG-6135 In JSC Eval('debugger') returns undefined",Abort); QVERIFY(ret.isString()); QCOMPARE(ret.toString(), QString::fromLatin1("extension(DebuggerInvocationRequest)")); } diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp index 2540096..8b86111 100644 --- a/tests/auto/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp @@ -523,7 +523,7 @@ void tst_QTcpServer::waitForConnectionTest() QTcpSocket findLocalIpSocket; findLocalIpSocket.connectToHost(QtNetworkSettings::serverName(), 143); - QVERIFY(findLocalIpSocket.waitForConnected(2000)); + QVERIFY(findLocalIpSocket.waitForConnected(5000)); QTcpServer server; bool timeout = false; diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp index fee030c..bebc4bd 100644 --- a/tests/auto/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/qtextedit/tst_qtextedit.cpp @@ -200,6 +200,7 @@ private slots: void pasteFromQt3RichText(); void noWrapBackgrounds(); void preserveCharFormatAfterUnchangingSetPosition(); + void twoSameInputMethodEvents(); private: void createSelection(); @@ -2183,5 +2184,23 @@ void tst_QTextEdit::preserveCharFormatAfterUnchangingSetPosition() QCOMPARE(edit.textColor(), color); } +// Regression test for QTBUG-4696 +void tst_QTextEdit::twoSameInputMethodEvents() +{ + ed->setText("testLine"); + ed->show(); + QList<QInputMethodEvent::Attribute> attributes; + attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, + ed->textCursor().position(), + 0, + QVariant())); + + QInputMethodEvent event("PreEditText", attributes); + QApplication::sendEvent(ed, &event); + QCOMPARE(ed->document()->firstBlock().layout()->lineCount(), 1); + QApplication::sendEvent(ed, &event); + QCOMPARE(ed->document()->firstBlock().layout()->lineCount(), 1); +} + QTEST_MAIN(tst_QTextEdit) #include "tst_qtextedit.moc" diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp index 9418be0..160d74c 100644 --- a/tests/auto/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp @@ -295,8 +295,8 @@ void tst_QUdpSocket::loop() QCOMPARE(paul.writeDatagram(paulMessage.data(), paulMessage.length(), peterAddress, peter.localPort()), qint64(paulMessage.length())); - QVERIFY(peter.waitForReadyRead(5000)); - QVERIFY(paul.waitForReadyRead(5000)); + QVERIFY(peter.waitForReadyRead(9000)); + QVERIFY(paul.waitForReadyRead(9000)); char peterBuffer[16*1024]; char paulBuffer[16*1024]; if (success) { diff --git a/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref new file mode 100644 index 0000000..ea85e32 --- /dev/null +++ b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref @@ -0,0 +1,7 @@ +StartDocument( ) +Comment( text=" Empty markup declaration in a doctype. " ) +DTD( text=" +<!DOCTYPE doc []>" dtdName="doc" ) +StartElement( name="doc" qualifiedName="doc" ) +EndElement( name="doc" qualifiedName="doc" ) +EndDocument( ) diff --git a/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml new file mode 100644 index 0000000..1c66c0c --- /dev/null +++ b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml @@ -0,0 +1,3 @@ +<!-- Empty markup declaration in a doctype. --> +<!DOCTYPE doc []> +<doc></doc> |