diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-17 13:32:40 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-17 13:32:40 (GMT) |
commit | 0610902bcd722605f10840a6a3d1600e1e07f771 (patch) | |
tree | d23cf33f3b318224c539899140aa79fd7f104bfb /tests/auto/declarative | |
parent | 08c6a3485b236b53ac925a404f01a077147cd556 (diff) | |
parent | 68a2073cca205d8a6c4a44305045e1ac64f664f0 (diff) | |
download | Qt-0610902bcd722605f10840a6a3d1600e1e07f771.zip Qt-0610902bcd722605f10840a6a3d1600e1e07f771.tar.gz Qt-0610902bcd722605f10840a6a3d1600e1e07f771.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:
doc: Added more DITA output to the XML generator
Usefully convert from QtScript object/array to QVariant
document QSslSocket::systemCaCertificates() change in changelog
Implement QIODevice::peek() using read() + ungetBlock().
Allocate the memory for QtFontSize when count > 1
doc: Added more DITA output to the XML generator
Defer allocation of GIF decoding tables/stack.
Make sure only started gestures can cause cancellations
Updated JavaScriptCore from /home/khansen/dev/qtwebkit-qtscript-integration to javascriptcore-snapshot-16062010 ( 8b2d3443afca194f8ac50a63151dc9d19a150582 )
qmake: Fix CONFIG += exceptions_off with the MSVC project generator.
Fix some kind of race condition while using remote commands.
Work around ICE in Intel C++ Compiler 11.1.072
Reduce the memory consumption of QtFontStyle
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r-- | tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml index d275ca8..e06afa2 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml +++ b/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml @@ -13,7 +13,7 @@ WorkerScript { function compareLiteralResponse(expected) { var e = eval('(' + expected + ')') - return worker.response == e + return JSON.stringify(worker.response) == JSON.stringify(e) } onMessage: { diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp index 52c11e9..8e98874 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp +++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp @@ -170,13 +170,15 @@ void tst_QDeclarativeWorkerScript::messaging_sendJsObject() QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create()); QVERIFY(worker != 0); - QString jsObject = "{'name': 'zyz', 'spell power': 3101, 'haste': 1125}"; + // Properties are in alphabetical order to enable string-based comparison after + // QVariant roundtrip, since the properties will be stored in a QVariantMap. + QString jsObject = "{'haste': 1125, 'name': 'zyz', 'spell power': 3101}"; QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(worker)); QScriptValue sv = engine->newObject(); + sv.setProperty("haste", 1125); sv.setProperty("name", "zyz"); sv.setProperty("spell power", 3101); - sv.setProperty("haste", 1125); QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, qVariantFromValue(sv)))); waitForEchoMessage(worker); |