summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Revert incomplete deltas work with blue surrounds.Michael Meeks2017-12-014-210/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pushed in error, and not ready for prime-time: Revert "Deltas - collapse multiple rows to a single row." This reverts commit 74f44251b782e5cab42960d1e328102a1538e72f. Revert "Convert Javascript to row deltas." This reverts commit fa86ba9ec5ecb418bd025c0bc7bbea8456409c07. Revert "Make delta-builder row-based." This reverts commit 5efb59db50a49374bcf53198f7c0a1e120754cc9. Revert "Start of Delta unit-tests." This reverts commit 42d264eeb00fc14bb89104c7dc8b3bcd53897e30. Revert "Move the Delta generator out into its own file." This reverts commit 78398d4482a5a39c87d7c0ec88fc9d357f73408c. Revert "Insert pixels from 'new' not 'old'." This reverts commit ed8807a1a5a613f54dfc5a204294e870969254e2. Revert "Deltas should be pixel based, add debugging." This reverts commit b1124c05a89007bd00f29be3e1a42d7817458048. Revert "Start of delta creator." This reverts commit 0bfbbf98510f82eb9a8ff3dc44254bd848458d53.
* Deltas - collapse multiple rows to a single row.Michael Meeks2017-11-221-10/+14
| | | | Change-Id: Ia2a617c2adbbc4e66b7c773c2280ec609aead16e
* Make delta-builder row-based.Michael Meeks2017-11-221-29/+53
| | | | Change-Id: Ic59324535c4f412abc4e83774073eb8f57290704
* Start of Delta unit-tests.Michael Meeks2017-11-224-0/+182
| | | | Change-Id: I1a25f5347c0d7430000146bb585a041d363bcf37
* Save As: Advertise the correct size when uploading the new file.Jan Holesovsky2017-11-102-4/+8
| | | | | | | Change-Id: I9b20c4bdb7ddc848437edceae1a77ddb49d55133 Reviewed-on: https://gerrit.libreoffice.org/44357 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
* Remove unused stringsMiklos Vajna2017-11-033-3/+1
| | | | Change-Id: I621c462bca38222dcf26dfa1e414cf27e1a3e088
* Fix convert-to after the Save As work.Jan Holesovsky2017-10-261-1/+5
| | | | | | | Change-Id: I1871dd8331367798ee42b2ca35505847b43b639d Reviewed-on: https://gerrit.libreoffice.org/43881 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
* SaveAs: Fix unit test when used without ssl.Jan Holesovsky2017-10-261-1/+1
| | | | Change-Id: Ic48908c9e7449fc13458d9211fa743310834bd6b
* tdf#99744 SaveAs: Extend test to check that the Save As result was sent.Jan Holesovsky2017-10-261-1/+12
| | | | Change-Id: I3788b87d2599c01000af97f496ee2b840c0cae3e
* tdf#99744 SaveAs: Report back to loleaflet that the saveas succeeded.Jan Holesovsky2017-10-262-9/+6
| | | | Change-Id: I670c8b4503c1a4c0a88001a1343f6dec2974e044
* tdf#99744 SaveAs: Use X-WOPI-SuggestedTarget instead of X-WOPI-RelativeTarget.Jan Holesovsky2017-10-261-2/+3
| | | | | | And the correct encoding - UTF-7 (huh). Change-Id: I6634fedb598c620128cc25a3e8fdc46e4096a756
* tdf#99744 SaveAs: Reimplementation of the PutRelativeFile going through Kit.Jan Holesovsky2017-10-265-27/+127
| | | | | | | | This is necessary so that changing of the file type works. Includes a unit test. Change-Id: Id01d44e555b6bac1002ff950de461fd330602f63
* PutFile ext: X-LOOL-WOPI-IsAutosave header to indicate autosave + unit test.Jan Holesovsky2017-10-031-0/+16
| | | | | | | Change-Id: I65ed711dae5100467fe6ed9902bd7bad8c7f8d68 Reviewed-on: https://gerrit.libreoffice.org/43074 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
* Speed-up the WOPI tests.Jan Holesovsky2017-09-272-10/+16
| | | | | | | Change-Id: Ib61c5b90703e4266dbad935cd632b8be50a4ac44 Reviewed-on: https://gerrit.libreoffice.org/42880 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
* WopiTestServer: Share more code.Jan Holesovsky2017-09-273-25/+29
| | | | | | | Change-Id: Ied539169f96608adb7095682bd8f0b7a70d28491 Reviewed-on: https://gerrit.libreoffice.org/42879 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
* PutFile ext: X-LOOL-WOPI-IsModifiedByUser unit test.Jan Holesovsky2017-09-274-12/+159
| | | | | | | Change-Id: I0b1ffc74dbbc771f0dcb68f87d46af3ba469ae9e Reviewed-on: https://gerrit.libreoffice.org/42855 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
* Separate the fake wopi server to an own class.Jan Holesovsky2017-09-272-86/+135
| | | | | | | Change-Id: Ibb1b06c491be0065aa12a05a43959165d6c86398 Reviewed-on: https://gerrit.libreoffice.org/42853 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
* Implement more reliable in-process short-cuts.Michael Meeks2017-09-194-4/+37
| | | | Change-Id: Icdfa71affad147c29df175ae687cbecc3f1f171b
* Re-factor pid hunting code into test.cpp where we can do better.Michael Meeks2017-09-196-108/+146
| | | | | | Prepare the ground for using WSD hooks for this. Change-Id: I5c3e32396b335ad189472ab3a51044372ee304b2
* Unit test script - add help and simplify usage.Michael Meeks2017-09-151-0/+15
| | | | Change-Id: I4687f9a39b1abcf5be7e7848c32dfd32c39e7707
* support for rendering a watermark on each tileMarco Cecchetti2017-09-071-1/+2
| | | | | | | Change-Id: I3edccac49a3bcd3d2493d8d7ef3a1ae29307e727 Reviewed-on: https://gerrit.libreoffice.org/41898 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
* Fix various nitpicks.Jan Holesovsky2017-08-172-26/+27
| | | | Change-Id: I41fe795bc1ea7c73527c7e1183de7098517bad7a
* unit tests: Really bail out on error; and no need for a tempfile.Jan Holesovsky2017-08-172-3/+3
| | | | Change-Id: I53c1ab62bf9293217a5cada54c358292364ed60a
* access_header: Pass the access_header around + unit test.Jan Holesovsky2017-08-171-27/+53
| | | | | | | | Change-Id: I5d6d93e289d8faceda59deae128e8124a0193d95 Reviewed-on: https://gerrit.libreoffice.org/41243 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: Jan Holesovsky <kendy@collabora.com>
* access_header: Infrastructure for providing custom headers for authentication.Jan Holesovsky2017-08-172-0/+46
| | | | | | | | Change-Id: I52e61dc01dbad0d501471e663aaf364d9bc23c52 Reviewed-on: https://gerrit.libreoffice.org/41223 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
* wsd: Fix the OAuth unit test.Jan Holesovsky2017-08-092-87/+113
| | | | | | | | Trying to combine the Poco's http server together with our polling loop leads only to problem; so instead let's introduce a hook where we can do the WOPI serving directly in the unit test. Change-Id: Id3fec6ff93c3ad652aa4e0fc6309c5b7639728cb
* wsd: OAuth token passingHenry Castro2017-08-032-1/+152
| | | | | | | | MS-WOPI: "The following HTTP header MUST be included in all WOPI requests." "Authorization "Bearer" and <token>" Change-Id: Ie5327286e93b86a49a0248ff5886bf3ea99df768
* Fix HTTPWSTest::testInactiveClientPranav Kant2017-07-061-1/+2
| | | | | | Fallback from 3a43f691167c6ad08ffc5670384ca3ab8cadcbe2 Change-Id: I8840e78bd4deec1edb2e3c4166134ac6ac4b3abf
* tdf#108341 automatic editor switch and follow addedAditya Dewan2017-07-061-0/+9
| | | | | | | Change-Id: I5129256a0633916a3ca2cb05ccba39a5f4a5d398 Reviewed-on: https://gerrit.libreoffice.org/39299 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
* Use WireIds instead of long hashes to identify tiles efficiently.Michael Meeks2017-06-203-16/+16
| | | | | | | | Changes protocol to use 'wid' instead of 'hash' everywhere. Wire-ids are monotonically increasing integers that can be mapped to hash values for all of the hash values and tiles we cache internally. Change-Id: Ibcb25817bab0f453e93d52a6f99d3ff65059e47d
* test: fix clang -Werror,-Winconsistent-missing-overrideMiklos Vajna2017-06-201-1/+1
| | | | Change-Id: Id3d8f979502de3e805d75a94da610543d935909a
* Make the slideshow SVG validation somewhat less lame.Michael Meeks2017-06-191-9/+47
| | | | Change-Id: Ie4853359ba3b43aabe629d0dcabb635d260627b6
* test: make sure own header is self-containedMiklos Vajna2017-06-191-2/+2
| | | | | | By including it before anything else. Change-Id: I0fa37dcee7828a05e3ba7aac4eec3b63d1203468
* Units: allow filtering of user alerts.Michael Meeks2017-06-161-0/+6
| | | | | | Catch things that kill tests like disk-full earlier. Change-Id: Ib50b516063305f2fc93b662ec3ad9ab6c52c6c92
* test: give the socket the chance to get the error in getErrorCode()Miklos Vajna2017-06-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | make check fails for me like this: Test name: HTTPCrashTest::testCrashKit equality assertion failed - Expected: 1001 - Actual : 65535 Failures !!! Run: 1 Failure total: 1 Failures: 1 Errors: 0 But when I run loolwsd and ./test manually (./test is invoked by gdb) and I step through the code, then the test passes. So I guess what happens is that we read from the socket too fast, and the error we're looking for is just not there yet. Add the same amount of sleep here (0.5s) than what's used in connectLOKit(), with that the test passes fine. (The sleep is in test-only code.) Change-Id: Iff105c45f21c40c2fb0a649fc9fd9a9065e7c952 Reviewed-on: https://gerrit.libreoffice.org/38846 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* Add missing UnitClient.cppMichael Meeks2017-06-061-0/+66
| | | | Change-Id: I267c5538faac695be7105ce4c81f1d247eb07595
* Run old-style unit tests as a new-style unit test.Michael Meeks2017-06-026-7/+51
| | | | | | | | This moves the code into the same process, for easier logging & debugging. Disabled initially. Change-Id: Id48b5649ba14deb0a2159ca59e321c7d0ae66dad
* wsd: test: undo conflictHenry Castro2017-05-301-0/+51
| | | | Change-Id: Iafdcf3e206a425b7e55cca7818beb620e9d06f85
* wsd: avoid race during viewinfo notificationAshod Nakashian2017-05-291-1/+1
| | | | | | | Change-Id: If2d8adc67337a5529cb6898808a84727ff1df38e Reviewed-on: https://gerrit.libreoffice.org/38123 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* Fix HTTPWSTest::testInsertDelete() failureMiklos Vajna2017-05-221-0/+2
| | | | | | | | | | .uno:DeletePage deletes the "current" page, while the intent here is to delete all slides except the first one. Be explicit about this. Change-Id: Ia8a8a5bf907e3d79cc646d54803447525375ce72 Reviewed-on: https://gerrit.libreoffice.org/37833 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
* wsd: Debugging environment vars to debug storagesPranav Kant2017-05-171-0/+10
| | | | | | Also, extend the LOOLProtocol::tokenize to accept a custom delimeter. Change-Id: I7f789e703c5c8d2ad325b3dd149ba888c722f5f3
* wsd: corrections to replace and unittestsAshod Nakashian2017-05-151-0/+12
| | | | | | | Change-Id: I0e03deaa710ba722a97c9f857b514f8ecb0e1682 Reviewed-on: https://gerrit.libreoffice.org/37609 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* wsd: correct the name of testDisconnectMultiView in outputAshod Nakashian2017-05-081-6/+6
| | | | | | | Change-Id: Ibfcee83825bf8f48e635d93061bf4fd1306a95fc Reviewed-on: https://gerrit.libreoffice.org/37371 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* SocketDisposition: push it down the stack, and cleanup around that.Michael Meeks2017-05-051-0/+1
| | | | | | | Dung out overlapping return enumerations. Move more work into 'move' callbacks at a safer time, etc. Change-Id: I62ba5a35f12073b7b9c8de4674be9dae519a8aca
* wsd: unittest to reproduce rendering issue in CalcAshod Nakashian2017-05-022-22/+65
| | | | | | | | | | | | | | | | The following scenario causes rendering failure where blank tiles are returned in CP-5.3. 1. Load doc where the cursor is saved to a top cell. 2. Page down to grow the document rows. 3. Render tile at last row. 4. Load a new view to the same doc (do nothing else). 5. Render same last-row tile, now it's transparent. Change-Id: I8f7caf61a7d221d1ccf56762b1e609de987976c5 Reviewed-on: https://gerrit.libreoffice.org/37132 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* wsd: add test helper to get server versionAshod Nakashian2017-05-021-0/+31
| | | | | | | Change-Id: I14ce574d4593d845f6621b447a678f2c4bbe29ac Reviewed-on: https://gerrit.libreoffice.org/37131 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* wsd: unittest to reproduce rendering issue in CalcAshod Nakashian2017-05-022-0/+73
| | | | | | | | | | | | | | | | The following scenario causes rendering failure where blank tiles are returned. 1. Load doc where the cursor is saved to a top cell. 2. Page down (typically several 100th row). 3. Load a new view to the same doc (do nothing else). 4. In the first view up-arrow to move cursor and invalidate. 5. New tile is rendered incorrectly. Change-Id: I06c7627d1b74d9e3be3e83d9d9a09cb5479ba660 Reviewed-on: https://gerrit.libreoffice.org/37129 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* wsd: unittest for correctly saving in presence of passive clientsAshod Nakashian2017-04-201-0/+70
| | | | | | | | | | | | Passive clients that don't load the document can be disruptive as they are not useful for saving the document, so we need to ignore them and use reliable sessions. Change-Id: I162ec00823ba5af776fcb55f6d58149f2a56d7bb Reviewed-on: https://gerrit.libreoffice.org/36712 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* wsd: fix verbose test outputAshod Nakashian2017-04-201-11/+17
| | | | | | | Change-Id: I089c31555a90c99c89745529c6df6552fd0bd7f9 Reviewed-on: https://gerrit.libreoffice.org/36709 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* wsd: re-enable a couple more tests that are stableAshod Nakashian2017-04-173-3/+2
| | | | | | | Change-Id: I01bc96ce7bde7cac10d0b4d023b0d5dd774ed058 Reviewed-on: https://gerrit.libreoffice.org/36602 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>