summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Use const & for your foreach variablesSergio Ahumada2014-03-011-1/+1
| | | | | Change-Id: I6096111284f02f07e1e7864b8795236563d4f6c1 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Prefer to use normalised signal/slot signaturesSergio Ahumada2014-03-011-4/+4
| | | | | | Change-Id: I92322fc3404795bea8442b9b849564d5cd39b367 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename websockets.pro -> qtwebsockets.proSergio Ahumada2014-02-163-6/+17
| | | | | Change-Id: Ia42316304a37d151b678a9922071bbb090ec87b5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Adapt copyright headerKurt Pattyn2014-02-1510-10/+10
| | | | | Change-Id: I9773492d3673d8aabdb4dd178be6af12eca7ba74 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add user configurable mask generationKurt Pattyn2014-02-153-1/+174
| | | | | | | | | Created a QMaskGenerator abstract base class to serve as a basis for user specific mask generators. Added the possibility to override the default mask generation in QWebSocket. Change-Id: Iaa02b44193f854d103b5f352617789175fe61f89 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix multiple emission of received signalsKurt Pattyn2014-02-151-0/+216
| | | | | | Task-number: QTBUG-36762 Change-Id: I239bdd06252fb90056a687ace8540bb91b0055a1 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Check on newline characters in origin and urlsKurt Pattyn2014-02-111-5/+107
| | | | | | | | | | New line characters (\r\n) in the resource part of a url and in the origin string can be used to forge the http header and can lead to insertion of unwanted header entries. This can be an indication of an attack, so QWebSocket immediately refuses a connection. Change-Id: I9cdb309bfbe7025ad675925e6ea3e038476a1fd6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove superfluous argumentKurt Pattyn2014-02-091-1/+1
| | | | | Change-Id: I7fa01d47d66411572f3f66f4ed5d8df04ac6b8b0 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix tst_QWebSocket::tst_invalidOpen for catch-all DNS setups.Milian Wolff2014-02-061-5/+5
| | | | | | | | | | | | Instead of relying on a hostname which might still be resolved in some DNS setups (i.e. always forward to google search or intranet), we now try to connect to localhost port 1 which should yield a ConnectionRefusedError. This way, the test passes for me on my setup. Change-Id: I025824796e94e718a42c4999706f647a72b37659 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix compilation of websocketprotocol test.Milian Wolff2014-02-061-0/+1
| | | | | | | | The versionFromString method must be exported for usage in the test. Additionally, the metatype of the version enum must be declared. Change-Id: I8e0aef28f9902f274cab43f772667ad5a93c4062 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add unit tests for QWebSocketServerKurt Pattyn2014-02-023-1/+374
| | | | | Change-Id: I9ca38aad22a757437943a72669b7ca2bb5db6b98 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add unit tests for QWebSocketKurt Pattyn2014-02-023-0/+242
| | | | | | | Added basic unit tests for QWebSocket. Connectivity is not tested yet. Change-Id: I38d388d289733777e6ff0253e5b201aca99b0b10 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Move versionFromString() from public to private APIKurt Pattyn2014-02-011-1/+76
| | | | | | | | This method is only necessary for processing of handshakes and hence is not needed in the public API. Change-Id: I6bb2327337600523a136fb394275c31b9819f631 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Move CORS authenticator test to non-private testsKurt Pattyn2014-02-014-34/+26
| | | | | | | | QWebSocketCorsAuthenticator is a public class and hence needs to be tested with the public API of QtWebSockets. Change-Id: If3af0744d8901f9c6c13d5fb9061ebf0a5a8d163 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Rename write methodsKurt Pattyn2014-01-202-4/+4
| | | | | | | | | Renamed the write methods to sendTextMessage and sendBinaryMessage respectively. This makes the code more readable. Change-Id: Ie49abf07a37f54c84bd01c5c788d2e42b28bcfdd Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove dubious functionsKurt Pattyn2014-01-201-2/+1
| | | | | Change-Id: Ida5c46e3e42685f5e78f2aee657d12af62286810 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use QStringLiteral where appropriateKurt Pattyn2014-01-205-24/+16
| | | | | Change-Id: I608b555428aceafd7761a882cd4bd1fdb50d19b3 Reviewed-by: Richard J. Moore <rich@kde.org>
* Limit line length to 100 chars per lineKurt Pattyn2014-01-204-93/+200
| | | | | Change-Id: I2a91033c9882ca54c6fcf26d9eb5a3c91f9e0f7d Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename enumerations to comply with Qt styleKurt Pattyn2014-01-184-283/+327
| | | | | Change-Id: Id72fe27cec606e7f02b8e9ac1d0d763890e86a95 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use QString() instead of QStringLiteral("")Frederik Gladhorn2014-01-183-6/+6
| | | | | | | | | | And do the same for QByteArray. Instantiating the default constructor uses QArrayData::sharedNull() for the d-pointer which is the cheapest constructor in memory and instructions. Change-Id: I1ceaafbc0c0cb1ccc5690edba89ea1100f30b3cd Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Simplify handshake reading functionsFrederik Gladhorn2014-01-171-3/+3
| | | | | Change-Id: I000243e717b79972caa676ff10f68901904f28c9 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Move OpCode out of public APIKurt Pattyn2014-01-132-0/+2
| | | | | Change-Id: Ic0b34b684d6f9ca98789304ead1cf8b993422d02 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add optimizationsKurt Pattyn2013-12-235-203/+333
| | | | | Change-Id: Icd293f832e2d7a6272d4953c1994065d16222375 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add CMake unit tests for WebSocketsLaszlo Papp2013-12-232-0/+21
| | | | | Change-Id: I1e1218d42880191439ed06f82d0053b0d9642b1c Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Cleanup code to comply with Qt styleKurt Pattyn2013-12-102-8/+2
| | | | | | | | | | | | | | - Correct placement of curly braces - Remove commented-out code - Remove superfluous qDebug statements - Add missing QT_BEGIN_NAMESPACE declarations - Add move semantics - Add cleanup handling to QWebSocketServerPrivate - Add error handling to handshake response, QWebSocketServerPrivate, QWebSocketServer, dataprocessor Change-Id: I0690dc2c444fd6fc0db974d1459bf41bd8c31d40 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Sanitize include directivesKurt Pattyn2013-11-063-13/+13
| | | | | Change-Id: I510e5e8f263d3ea08dd3d623b054d06b2911c6d6 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Put fixed string length in test dataKurt Pattyn2013-11-031-2/+4
| | | | | Change-Id: I01e24b17656278c77de431c5df49d2bbd996ee89 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use escape sequences to make VS happyKurt Pattyn2013-11-031-1/+2
| | | | | Change-Id: I78dd73537e53ce5346b3a342c7a5d654cf9afb36 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Convert string from utf8 to make VS happyKurt Pattyn2013-11-031-1/+1
| | | | | Change-Id: I5cc2c3d0ffe237c6c0bf3f7ef37d28e08c2fd02e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove memory access errorKurt Pattyn2013-11-031-5/+9
| | | | | Change-Id: I72d689c08b89be72e6bcb8171aa40812f3c77250 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Change masking to octet based processingKurt Pattyn2013-11-031-3/+3
| | | | | Change-Id: I1b450bf35760e8a5157cb1013f4668815640be5d Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Make mask explicitly big endianKurt Pattyn2013-11-021-4/+7
| | | | | Change-Id: I3ed5fa7322ae71d9350f4c1fa835f07117ea125e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Make mask explicit little endianKurt Pattyn2013-11-021-4/+4
| | | | | Change-Id: I5e81ae12765010faf80caa265ab832af26a61f79 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Move non-public methods from websocketprotocol to private headerKurt Pattyn2013-11-023-4/+9
| | | | | | | Add bigendian conversion of masks to unit tests Change-Id: I3f23fb62aac1c6d06e5fafb1bd4bc47cc03765ce Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Sanitize .pro filesKurt Pattyn2013-11-025-5/+0
| | | | | | | | Remove c++11 config flag if not necessary Remove mac specific compiler settings Change-Id: If3cb4c5396f6dd5679a9fc8cf8f8a81c34ad6f4c Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Move metatype declaration inside namespaceKurt Pattyn2013-11-022-5/+5
| | | | | Change-Id: I692f5cb10862199dfeaa94a6cedc62c5034e7a5d Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove manual tests from tests.proKurt Pattyn2013-11-021-1/+1
| | | | | Change-Id: Id3464abd736cd663eefe3a08585515c03441b6f8 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use full path for includesKurt Pattyn2013-11-024-33/+4
| | | | | Change-Id: I3f8d78527661d76050df5dd6ef71123190c1fecb Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove ignoreSslErrorsKurt Pattyn2013-11-011-3/+1
| | | | | Change-Id: I12dd46acb1bd7f71cf6df0eb2fae62bb3b655369 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename autobahn to manualKurt Pattyn2013-11-011-1/+1
| | | | | Change-Id: I34bc23f60ee69c4005495defd22d2079a5206426 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove websocketcorsauthenticator tests from non-developer buildsKurt Pattyn2013-11-011-3/+3
| | | | | Change-Id: Ifadd89c4e51367b2bf04852bcb1d1d856543069e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename autobahn to manualKurt Pattyn2013-11-015-0/+0
| | | | | Change-Id: I82236190d8af0ef75c605ac662d217c2f3d94dc6 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove unneeded filesKurt Pattyn2013-11-014-70/+0
| | | | | Change-Id: Iff3e9b3abdc3e9159ec75ca5466aad6f93314aa4 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add correct license headersKurt Pattyn2013-11-012-0/+80
| | | | | Change-Id: I789cd780697aedbca7a90a5991df00b2c7e9ec98 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add functionality to ignore ssl errorsKurt Pattyn2013-11-011-2/+6
| | | | | Change-Id: I81248b9af104c0b3d37c9cfcef250a102f4b1d32 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add check for host() methodKurt Pattyn2013-10-191-0/+6
| | | | | Change-Id: I12d6761232193c62888681bb71ee0d5c6df9d3d2 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove CXX debug flags from project fileKurt Pattyn2013-10-191-2/+0
| | | | | | | The debug flags are normally set by the Qt build environment. Change-Id: Icc61c7d5aeed7c73ac6c947d31d9eed71c02a606 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Put assignment on separate line to avoid compiler optimizationKurt Pattyn2013-10-191-1/+2
| | | | | Change-Id: I981c2caba0d6a96ee54226ec001de6da8df9e5c2 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add flag to not optimize when in debug modeKurt Pattyn2013-10-191-0/+2
| | | | | Change-Id: Iefaf4f6361042b3c3e5fb9bc620228e3e9cd3cbd Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add test for constructor and assignment operatorKurt Pattyn2013-10-191-1/+56
| | | | | Change-Id: I4a475ca6e173a7102d465d821f1427d0b6d206d0 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>