aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlxmlhttprequest
Commit message (Collapse)AuthorAgeFilesLines
* Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-031-1/+0
| | | | | Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* tests/qml: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-291-1/+1
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I8cc97fd9b48fc789a849e9527c292c4e05accd97 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-271-32/+32
| | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: I8a4e44a2b4e20a9c8b811799e3932c8ce1a2cbbb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QML Engine: Support for "PROPFIND" method for XMLHTTPRequestValery Kotov2015-07-189-0/+657
| | | | | | | | | | | | Support for WevDAV PROPFIND method was added to QQmlXMLHttpRequest. Tests for PROPFIND method in XMLHttpRequest were added. [ChangeLog][QtQml][QQmlXMLHttpRequest] QQmlXMLHttpRequest now supports the PROPFIND method in HTTP requests. Task-number: QTBUG-36456 Change-Id: Ie36fcc901e7c1583840f04166c1774a1defe9308 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/quick/items/qquickitemsmodule.cpp src/quick/items/qquicktext.cpp src/quick/util/qquickpixmapcache.cpp tests/auto/quick/qquickwindow/tst_qquickwindow.cpp Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a
| * Fix default value for XMLHttpRequest.response propertySimon Hausmann2015-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The default value for responseType is the empty string, for which the expected data type for the response property is a string - same as when the response type is set to "text". In other words: By default the response property should contain the string representation of the data. Task-number: QTBUG-45862 Change-Id: I563160e5cdfbf93aca7e283e455d77a6b9deceb4 Reviewed-by: Pasi Keränen <pasi.keranen@digia.com> Reviewed-by: Valery Kotov <kotov.valery@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QMLEngine: Update XHR tests with checking status codeValery Kotov2015-05-054-4/+9
| | | | | | | | | | | | | | | | | | Update QQmlXMLHttpRequest unit tests with checking status code in resopnse message. Task-number: QTBUG-45581 Change-Id: Ia9fdb4463582bdb098be5d0cab022993904a3d51 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-04-2819-71/+87
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f
| * Merge remote-tracking branch 'origin/5.4' into 5.5Simon Hausmann2015-04-2718-68/+84
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp Change-Id: I715b8a78b74cbe0dcaf599367fd6e08af4858e11
| | * Prospective fix for flakey "network" related QML testsv5.4.2Simon Hausmann2015-04-2514-58/+66
| | | | | | | | | | | | | | | | | | | | | Replace hard-coded server ports with dynamically allocated ports. Change-Id: Iab8f9a88343a9f2c49af3cd700c954c13c3bf121 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | QML Engine: JSON XHR response type supportValery Kotov2015-04-165-0/+56
|/ / | | | | | | | | | | | | | | | | | | | | Support for "json" response type for QQmlXMLHttpRequest was added. [ChangeLog][QtQml][QQmlXMLHttpRequest] QQmlXMLHttpRequest now supports "json" binary response type. Change-Id: I21b7659c02dfdc6b64a73e1d2003e269d90b3b23 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QML Engine: ArrayBuffer XHR response type supportValery Kotov2015-03-095-0/+56
| | | | | | | | | | | | | | | | | | | | | | Support for "arraybuffer" response type for QQmlXMLHttpRequest was added. [ChangeLog][QtQml][QQmlXMLHttpRequest] QQmlXMLHttpRequest now supports "arraybuffer" binary response type. Change-Id: I866e543cc7bc6ab037ffff1ef6628057b73daf90 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | support XMLHttpRequest sync modeTasuku Suzuki2014-12-262-11/+42
| | | | | | | | | | | | | | [ChangeLog][QtQml][XMLHttpRequest] Supported synchronous requests Change-Id: Ia38fcf97f212a14657bb519240d8406368a72390 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | QML Engine: Support for "OPTIONS" method for XMLHTTPRequest was added.Valery Kotov2014-09-157-0/+118
|/ | | | | | | | | | | | Support for OPTIONS method was added to QQmlXMLHttpRequest. Tests for OPTIONS method in XMLHttpRequest were added. [ChangeLog][QtQml][QQmlXMLHttpRequest] QQmlXMLHttpRequest now supports the OPTION method in HTTP requests. Task-number: QTBUG-35892 Change-Id: Ibbcf3ecddeb8ced64d8c3e52b777dd6ec0ed98f7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-102-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
| * Stabilize tst_qqmlxmlhttprequest::stateChangeCallingContext() on Mac.Friedemann Kleint2014-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix fails: tst_qqmlxmlhttprequest::stateChangeCallingContext() '(object->property("success").toBool() == true)' returned FALSE. () Debugging reveals that in most cases the function loadComponent() is only called with parameter which=1; the call with parameter which=0 never triggers. Change-Id: I3c9c2f618d52c2bc8dd584a5fc3ab2f115715381 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Fix XHR auto tests always failingSimon Hausmann2014-04-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test (rightly so) expects that even for a 400 response, the responseBody must be preserved - as per commit 0949071f13e7bcbc16a0f07f496e0b6a23b04edd. However before commit fd5dd2712656cbc674c8360754394e41dd82e40c in qtbase, 400 was mapped to QNetworkReply::UnknownContentError, which is "handled" by QQmlXMLHttpRequest::error in the sense that the body is preserved. After the qtbase behavioral change, 400 now maps to QNetworkReply::ProtocolInvalidOperationError, which was _not_ handled, the body was cleared and the test failed. The revdep of qtdeclarative for qtbase should've caught the behavioral change in qtbase, but unfortunately the auto-test was disabled (marked insignificant). This patch adjusts the xhr implementation to the behavioral change in qtbase and also re-activates the xhr auto-test (we really should be testing our xhr implementation in the CI system...). Task-number: QTBUG-38180 Change-Id: I7655fd9037752ad644a98d01257bf5f81e7daa15 Reviewed-by: Mandeep Sandhu <mandeepsandhu.chd@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | TestHTTPServer: Make listening an explicit operation that reports failure.Robin Burchell2014-03-211-42/+41
|/ | | | | | | | | | Use this to print the error message when listening fails, and switch to always stack allocating TestHTTPServer instances for easier cleanup. Change-Id: I63b2bd38963b66611dc08a5c322615d91a91e675 Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* fix whitespaceOswald Buddenhagen2014-01-2213-99/+99
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* tst_qqmlxmlhttprequest: Use QScopedPointer.Friedemann Kleint2013-11-211-196/+99
| | | | | | | | Ensure resources are cleaned up in case of failing tests. Change-Id: Ie27800da37beac09fec34111af276ed029dcde20 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-263-3/+3
|\ | | | | | | | | | | merge Change-Id: I5824a3eb624b325de10acfd5109c4c1bdabcf780
| * Replace www.nokia.com by www.qt-project.org in tests.Friedemann Kleint2013-07-123-3/+3
| | | | | | | | | | | | | | Task-number: QTBUG-32390 Change-Id: I595b1bf683d1e63e44354c042f23dd9e10847862 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | Fix instanceStateValues xhr testSimon Hausmann2013-06-201-10/+10
|/ | | | | | | | | | Writing to a read-only property or trying to deleting will throw an exception in strict mode and thus abort the execution. Make the test work in strict and non-strict mode by surrounding the offending statements with individual try/catch pairs. Change-Id: I25f803b6ffd7ef721ac874f53a37b3208b5c05ab Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Improve timer dependent tests.Frederik Gladhorn2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | tst_QQuickLoader::loadedSignal depended on sharing the engine with simultaneousSyncAsync and that function being run before it. After each test run call clearComponentCache() as that is important for caching of the network tests. The test server would send the item after 500ms. Sometimes the CI would be faster or slower. Instead of relying on timing, simply call a function when the reply should be sent. Change-Id: Ifb0447041197e1cba103570597a62a2510d31aab Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Mark failing tests as insignificant.Stephen Kelly2012-10-241-0/+2
| | | | | Change-Id: I2dbed0d5fe632a034a0f656c2e3ccc3e63d4078b Reviewed-by: Richard J. Moore <rich@kde.org>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Skip failing testBea Lam2012-08-021-0/+4
| | | | | | | | tst_qqmlxmlhttprequest::stateChangeCallingContext() sometimes fails on Windows. Change-Id: Ib755c614e23587e6ea216da5c9108100a0f05d39 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I6988c2360e9d88916311374a0c910bfc5b607439 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove unwanted whitespace from test URLsMatthew Vogt2012-07-101-2/+6
| | | | | Change-Id: Ia39c7bc458f46a8a32c1e54a8963b1f89dbbf271 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix crash in QQmlXmlHttpRequestChris Adams2012-07-026-1/+117
| | | | | | | | | | | | | | | | | | If an onreadystatechange handler of a QQmlXmlHttpRequest uses code which requires the engine->callingContext() to be valid, a crash could previously occur (since the callingContext() would be null if the handler was called due to a network request finishing. This commit saves the calling context on send, so that on dispatch we can create an activation scope from that context and use it. Note that even in this case, if the original context had previously been deleted (e.g., by a loader deleting the item context on source change) the saved context could be invalid by the time the dispatch function was invoked. In that case, we simply do nothing as the function call cannot succeed (invalid context). Change-Id: Iba357829a69433c11cc279e6cc9fdc0bedaa31fb Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Removed CONFIG+=parallel_test from suspected parallel-unsafe testsRohan McGovern2012-05-221-2/+0
| | | | | | | | These tests have failed a parallel stress test and may contribute to instability in test runs. Change-Id: I8d82e9df7df6cac374b8b2eda43de8e96b676972 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Keep XMLHttpRequest response data after receiving a server errorTopi Reinio2012-05-014-13/+4
| | | | | | | | | | | | | | | | | Fix XMLHttpRequest.responseText being set to empty string whenever a server status code other than '200/OK' is received. XMLHttpRequest specification says that response entity body is to be returned unless the error flag is set, and the flag is set only in case of abort() or network error. This change enables clients to receive additional error information the server may return in the response body. http://www.w3.org/TR/XMLHttpRequest/#the-responsetext-attribute Task-number: QTBUG-21706 Change-Id: I7e44f481494dc7eddea3868d6f92ee45d7ab0c69 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix data file checkout formats in Windows for some declarative testsMiikka Heikkinen2012-03-191-0/+3
| | | | | | | | | Fixed by adding proper .gitattributes for the tests Task-number: QTBUG-24780 Change-Id: If8de0161a377c21fb5c6327d69e8da84174ee435 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Changed qml tests to work from install directoryKurt Korbatits2012-03-071-3/+1
| | | | | | | | | | - Changed tests to use TESTDATA - moved qqmlcontext to private test as it contains private header - added check for cross_compile option to skip when sources not available Change-Id: I0f68f58ffcb1b41b8e40a9851e3e003fe72ee2f9 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2487-0/+3592
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>