summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add binary comaptibility file for QtWebSockets for Qt 5.12Milla Pohjanheimo2018-12-181-0/+5602
| | | | | | | Binary compatibility file added. Change-Id: I3a7c598cc47fb243325881c089857ec8955dd67c Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-11-241-0/+5
|\ | | | | | | Change-Id: I8cd45ab778b95b7d444b06940fd7b4ddc83a599b
| * tst_qwebsocketserver: force TLS 1.2 for the PSK testMårten Nordheim2018-11-231-0/+5
| | | | | | | | | | | | | | | | | | | | When using TLS 1.3 the psk callback is called on the start of a connection. Force TLS 1.2 to avoid this. Task-number: QTBUG-71560 Change-Id: I97df3a9d2f100d10b4a1d2e8d0e4696688ec66ac Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 7022a1f7e8f703815022bc7d0956da54f9f7a3c1)
* | Fix implicit conversion warningJesus Fernandez2018-08-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Marks the old functions as deprecated and adds new safe versions.The new functions give access to the native descriptor safely. It also fixes the original functions in Qt 6. warning: implicit conversion loses integer precision: 'qintptr' (aka 'long long') to 'int' Change-Id: I59177905af0181912d2e7824ce68265cb8ee03d9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Remove redundant options and a stray defineJesus Fernandez2018-08-1711-16/+11
| | | | | | | | | | Change-Id: Ic7ce11f1631197e6ee019b66c0d7ec56590c5ab5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Refactor manual testJesus Fernandez2018-08-161-89/+47
| | | | | | | | | | | | | | | | | | | | Rewrite a manual test to be data-driven, rather than clumsily recursive. Modernise and tidy the code in the process. Change-Id: I11919adf1bceaec831b8573bd1194fb2ab15297d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Use nullptr instead of 0Jesus Fernandez2018-08-141-1/+1
| | | | | | | | | | | | Change-Id: Ia3610779a2006d9027a1c4427a968e13cfc28cbe Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Use nullptr instead of 0Jesus Fernandez2018-08-102-2/+2
| | | | | | | | | | | | Change-Id: Ibad1bbb351d14ab0de140875d2969b7da483eb21 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-0/+29
|\ \ | |/ | | | | Change-Id: Iffe66da51d3b7b38d04ca3c185b3b003b157f886
| * Limit Close frame to 125 bytesMårten Nordheim2018-08-061-0/+29
| | | | | | | | | | | | | | | | | | | | | | All control frames should be limited to 125 frames. https://tools.ietf.org/html/rfc6455#section-5.5 Task-number: QTBUG-62949 Change-Id: Id9b5a431faab6ff6edf7dc2e5c3525e999bc04ea Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-031-1/+2
|\ \ | |/ | | | | Change-Id: Ieb9c874a99c519c7871dda3c437e6f3a66ba440c
| * Migrate tst_handshakeresponse to QRegularExpressionSamuel Gaist2018-06-301-1/+2
| | | | | | | | | | | | | | | | | | This patch updates the tst_handshakeresponse test to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: I98febd0565351b644dd68b98d356764bee78d7c5 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-121-0/+5472
|\ \ | |/ | | | | Change-Id: Iec795a4f7ca2fdf632b0fca57b81e1da41893e96
| * Add binary compatibility file for 5.11 for QtWebSocketsMilla Pohjanheimo2018-06-051-0/+5472
| | | | | | | | | | | | | | File for bic test added. Change-Id: I6b1a221f1bc2465f0bd1c323a534ecf22869a7da Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QWebSocket: Add 'bytesToWrite'Mårten Nordheim2018-04-142-0/+16
|/ | | | | | | | | | | | | | | | Add the well-known 'bytesToWrite' function to QWebSocket. Previously the only way to know how many bytes were left to be written was to make a guesstimate on the overhead your message would get and then keep track of the amount sent using the 'bytesWritten' signal. The tests compare using '>' because there is overhead from the headers. [ChangeLog][QWebSocket] Added the bytesToWrite function to QWebSocket. Call this function to see how many bytes are left to write. Change-Id: I82f17a98b582ee3bc02f0c47597b4a6717761f12 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-202-1/+5473
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic66a4cabbe0a2af1fa59ae33026a236437434a85
| * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-01-181-1/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I4a88ddf6722f4b29512fbec71f3d055591e625ba
| | * Fix apparently invalid auto-test (qmlwebsockets)Timur Pocheptsov2017-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | It makes sense to first start listening (server.listen = true) and then connect (socket.active = true). Task-number: QTBUG-59388 Change-Id: I4235dad87ee3a62ebf75cec39e5d9fa4b7ed7552 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Add binary compatibility file for QtWebSockets for 5.10Milla Pohjanheimo2018-01-091-0/+5472
| | | | | | | | | | | | | | | | | | | | | | | | File to test binary compatibility for 5.10 added Change-Id: Iade26098325ba00e45cc055c9ebf8ff8fe2cd67b Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Make HTTP header parsing RFC-compliantRobert Griebl2017-11-281-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All this home-grown parsing should be replaced with code from the qhttp* classes. This would result in a big refactoring though, so this commit at least tries to make the header parsing RFC compliant and not choke on perfectly legal "Header:Value" messages. Change-Id: I14303610dc7187b8d8595568fb221c18e4e0d515 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-201-33/+24
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | Conflicts: src/websockets/qwebsocket_p.cpp tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp Change-Id: I40922fab198a09a3fbba1b2f11b42f2d40e53720
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-301-34/+24
| |\ \ | | |/ | | | | | | Change-Id: I3ae5df71f201cfdb9a4c9e7d90a60d1f9792700a
| | * Fix empty sslConfiguration in sslErrors slotAndré Klitzing2017-10-271-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QWebSocket fires signal sslErrors the QSslConfiguration of QWebSocket is not updated. So client application cannot check it in implemented slot. Fix this by calling the update method like for encrypted signal. Sibling of QTBUG-40401. Change-Id: I18b39f6b6a0791ae67fc2bff5cf2c04a22b0ab85 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Check count of spy to verify signalAndré Klitzing2017-10-271-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like QVERIFY(spy.wait()) is a little bit flaky. We should check the count of the spy if it was successful instead of the return value of wait since wait will return false even if the signal was delivered before the call to wait(). Change-Id: I5f9031685dfa69b00155fa22602bab998843cb68 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Replace typedefs by QOverloadAndré Klitzing2017-10-301-2/+1
| | | | | | | | | | | | | | | | | | Change-Id: I509332fa23bcf2cf2e6c10b7edacb4157f025ff9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | test: fix tst_QWebSocket::tst_moveToThread()Liang Qi2017-10-261-2/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63707 Change-Id: Iaba78256f790bc422790a03fccb841e6e6482fc1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-262-2/+2
|/ / | | | | | | | | Change-Id: I0988a4119b5bd790d286c16b5647d97d4d95aef0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devv5.10.0-alpha1Liang Qi2017-08-151-0/+5151
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3dd9c568ed9160510bff527355ecfbed5d4690a9
| * Update binary compatibility file for Qt 5.9.0 for QtWebSocketsMilla Pohjanheimo2017-06-301-0/+5151
| | | | | | | | | | | | | | Binary compatibility file updated for Qt 5.9.0. Change-Id: I58561a76c8f9d3353d9cf352dd39734044c3e8e2 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Enable tests for boot2qtSami Nurmenniemi2017-07-194-7/+57
|/ | | | | | | | | | | | | Websocket tests for boot2qt were disabled with commit 1a75da8d514c90cf1af250ba3eaa764df4838775. The tests can be enabled since qtdeclarative now fallbacks to software renderer if OpenGL is not supported. Qemu still has missing syscall support so some tests need to be skipped if that condition is detected. Change-Id: I39dba91cb35cc17a9a9263c90a739cbf95efa582 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Explain how to run the manual testJesus Fernandez2017-05-311-0/+6
| | | | | | | | Adds a comment about the preconditions to execute the test. Change-Id: Iafb56ec18520e02681cce73e406f0e9744662a77 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Disable/blacklist failing tests for boot2qtSami Nurmenniemi2017-05-092-0/+6
| | | | | | | | | Currently boot2qt is tested with QEMU and some tests fail. Disabling them for now to make it possible to enable qt5 tests for Coin. Task-number: QTBUG-60266 Change-Id: Ib93153c857c1645c189db1bd69951cc29acfdccf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix QtWebSockets manual test buildv5.9.0-beta4Jesus Fernandez2017-05-031-1/+1
| | | | | | | | Call public QWebSocket::open(const QUrl &) instead of QWebSocketPrivate::open(const QUrl &, bool). Change-Id: Iab248745f37787d7e3df3d6fd668fc60ad10d220 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9v5.9.0-beta3v5.9.0-beta2v5.9.0-beta1Liang Qi2017-03-102-1/+5132
|\ | | | | | | Change-Id: Idcd43fba828b00cef553c3142462a4776aeeda8d
| * Exclude console application tests on UIKit platforms5.8Jake Petroules2017-02-221-1/+1
| | | | | | | | | | | | | | | | | | Those platforms do not support console applications with the public SDK. Change-Id: I8993882c04c5a4b539f297d13ae09ce9ae8e9463 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Aleksey Lysenko <lysenkoalexmail@gmail.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Binary compatibility file for qtwebsockets (5.8.0)Milla Pohjanheimo2017-02-031-0/+5131
| | | | | | | | | | | | | | Added binary compatibility file for qtwebsockets Change-Id: Ia5c70c8f15fba7bd09c40d2bafe95802cb52a6c7 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Add a function to hand off a tcp socket to the websocket serverAleksey Lysenko2017-01-271-0/+34
|/ | | | | | | | | | | | | This method allows a listening port to process connections with different protocols. It lets the websocket server handle a TCP socket, upgrading it to a websocket [ChangeLog][QWebSocketServer] Add support to handle external QTcpSocket Done-with: André Klitzing <aklitzing@gmail.com> Task-number: QTBUG-54276 Change-Id: Ia36b481dc87d6f3806e9f1e61e75e528640f1937 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix the parser of port in hand shake requestLiang Qi2017-01-061-0/+103
| | | | | | | | | | Use QUrl::setAuthority() to parse host and port. The request is invalid when having username or password in Host. Task-number: QTBUG-57357 Change-Id: I4e7c0370794dce15359d372a1e36dc0383083204 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed possible block clearing in QWebSocketDataProcessor::process methodAleksey Lysenko2017-01-041-8/+46
| | | | | | | | | | | | | In QWebSocketDataProcessor::process() the signals text(binary)MessageReceived are emitted before clear() method. If signal handler blocks loop (for example, using QDialog::exec()), clear() will be called only after resuming loop. It may lead to the data corruption due to the fact that QWebSocketDataProcessor clearing won't be performed before the new data arrived. Task-number: QTBUG-55506 Change-Id: Ib7016a91d3987dec7c1af977b17f86a53568c413 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fixed wrong scheme for secure websocketAleksey Lysenko2016-12-165-0/+109
| | | | | | | | | | Websocket server always constructed QWebSocketHandshakeRequest like for non-secure socket without checking SecureMode. This led to the fact that secure socket had "ws" scheme. Task-number: QTBUG-55927 Change-Id: I881766f55182136072fd23f3fefe93ea60f3d27d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-263-0/+10117
|\ | | | | | | Change-Id: Ia8c2930d5bf681227cef0730cdf0dca6d068722f
| * Binary compatibility file for QtWebSockets (5.7)v5.7.15.7.1Milla Pohjanheimo2016-10-041-0/+5096
| | | | | | | | | | | | | | BC file added for QtWebSockets module Change-Id: I94fdae9d83003ebe17a2799794047ee095880205 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-012-0/+5021
| |\ | | | | | | | | | Change-Id: I95f1e6fd6e9033e27bcf618e1eb50cd011ac5c4b
| | * Added binary compatibility data files to QtWebSockets for Qt 5.6Milla Pohjanheimo2016-09-302-0/+5021
| | | | | | | | | | | | | | | | | | | | | | | | Added the generated data files for the binary compatibility tests for QtWebSockets for Qt 5.6 Change-Id: I2fce98cac5eec3dbf6192782ea419653ea5f3db2 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | | Eradicate Q_FOREACH and Java-style loops and mark the module as Q_FOREACH-freeMarc Mutz2016-09-071-3/+2
| | | | | | | | | | | | | | | | | | Change-Id: I200f72423f13b54c636e995b120a70968b0e0758 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Clean up QT_CONFIG usageLars Knoll2016-08-197-7/+7
| | | | | | | | | | | | | | | | | | | | | Use the newer qtConfig() method instead. Change-Id: I197dbe01edaf8696ee06d30400bd18e53cf69c94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Add support for TLS PSK (client and server)André Klitzing2016-06-121-0/+127
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][QWebSocket] It is now possible to use TLS PSK ciphersuites. Change-Id: I9e96669494cec5e6a4e076fe9f10fcd4ef6358a4 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Add binary message support to QML WebSocket typeNobuaki Sukegawa2016-03-051-1/+24
|/ / | | | | | | | | Change-Id: I4472e899606d261420141e7b382717cbe12943c8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-2015-255/+180
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I191cd4111d18052fbe80bbe21bf851bf4795a1a6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Add QML test casesNobuaki Sukegawa2015-12-281-4/+44
| | | | | | | | | | Change-Id: Ie652bddf7f98271d01ebe6818817ea28d9c83fae Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>