Commit graph

79 commits

Author SHA1 Message Date
Miklos Vajna
773080eb74 Fix failing HTTPWSTest::testInactiveClient()
It seems to me that in this case the test was poor, if other
invalidation types are expected, then this one should be fine, too.

Change-Id: Iae7597eef081acdfb5d6f9152747204a71bd2b66
2019-08-02 09:35:20 +02:00
Miklos Vajna
c2c7982e5e Add TIFF load testcase
Fails with core.git commit ad8f4c4432e0c5c052b6f87977d1ad8663debe09 (vcl
lok: pre-load graphic libraries, 2019-07-04) reverted, which fixed TIFF
loading in the preload case (running in a chroot, no code available in
the chroot).

Change-Id: Ic46da0abcb13c4dd6fc1ce697b93e0b3062077d7
2019-07-04 17:57:01 +02:00
Miklos Vajna
1d32dc1742 Fix HTTPWSTest::testRenderShapeSelectionImpress() against product core
This test only passed when core.git was built in a way so that '#if
OSL_DEBUG_LEVEL > 0' was true (debug, dbgutil builds). Re-generate this
against a product build, since 2 other tests already have references
like that.

We already have infrastructure for stripping <desc> XML elements from
the actual result.

Change-Id: I9cdd53bf9625266d94313a90946270bfc266bd47
2019-05-09 14:25:21 +02:00
Miklos Vajna
aa5b28ceb0 test: fix HTTPWSTest::testRenderShapeSelectionWriterImage() failure with ...
... debug core.git. Same problem, need to filter out <desc> XML
elements.

Change-Id: I84973b831508e6a073d9c75868307d98a2ada370
2019-05-09 10:40:25 +02:00
Miklos Vajna
0fbabb7a22 test: fix HTTPWSTest::testRenderShapeSelectionWriter() failure with ...
... debug core.git.

SVGActionWriter::ImplWriteActions() in core.git writes additional <desc>
XML elements, guarded with a '#if OSL_DEBUG_LEVEL > 0' block.

Filter these out, so the reference SVG will match both product and debug
builds.

Change-Id: Iba3fb25af206c70d5a4ff5801a934dcfd74704de
2019-05-09 10:30:11 +02:00
Michael Meeks
5406a25b24 tests: make SVG comparison tests much more helpful.
Dump the SVG we actually get as a .new file for easy upgrade and
comparison on mismatch.

Change-Id: I607a97ff27a9bf480524efc31877e46d74c5ee3d
Reviewed-on: https://gerrit.libreoffice.org/71681
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-02 17:16:08 +02:00
Ashod Nakashian
30fb30cff4 wsd: use same method to parse json
DynamicStruct is also more recent and is missing
from older distros and versions of Poco, so avoid
using it just for that.

Change-Id: I465fbbc4350101d382877bd42a1704e4e7827102
2019-01-22 14:52:40 +01:00
Tamás Zolnai
b007656e6a Add a test case of SVG export of Writer image
Change-Id: Ic81754d965a89106f50866a148c7ced0be4a3e9a
2019-01-22 14:52:39 +01:00
Tamás Zolnai
e394999caa Add test case for SVG export of selected shapes in case of Writer
Change-Id: I96e4e4bb098ea37974d6cc684c9b8170ad72869e
2019-01-22 14:52:39 +01:00
Tamás Zolnai
209e1cd7ee Handle Special character toolbar item state correctly
The toolbar item should have the same names as the UNO command in lower case.

Change-Id: I68264e7d58cca829084965fb5ea9686a85ccd9cd
2018-12-14 17:59:00 +01:00
Miklos Vajna
e9e1db61cc HTTPWSTest::testRenderShapeSelection: this test expects an SVG generated by core 6.0
So avoid the test with newer core, which generates a slightly different
SVG.

Change-Id: I9357530735640a40a176140e26ddeb334cd7e89f
2018-12-11 09:10:43 +01:00
Tamás Zolnai
bdab8184a8 Remove unneeded lines from rendershapeselection test
SelectAll does the selection.

Change-Id: I2642b9c1eef1398fa78f39a1a6645e0cf7d266bb
2018-12-07 12:39:27 +01:00
Ashod Nakashian
e5723a22d7 wsd: update bundled headers and improve renderShapeSelection test
Unfortuantely it still fails, but this is not regression. Now
with the new patch in Core the exception is caught and so at least
the binary survives (and the API returns 0).
New unit-test added in Core to help track the issue down and fix.

Also, free the memory allocated by the API.

Change-Id: I5d788a2ee0383de1c323af4cd6b39b8615a35baf
2018-12-07 12:39:27 +01:00
Tamás Zolnai
b34b1242d6 Remove unneeded include used for debugging only
Change-Id: I82efb9b6d0a0e6ffdca4b9205804446bc871ef84
2018-12-07 12:39:27 +01:00
Tamás Zolnai
31f99bf9f5 Introduce client-server message for requesting the selected shape as SVG
It works for Impress only now.

Change-Id: I130707d8e96e0c633f2531b1cb81ce74dc6ec6e1
2018-12-07 12:39:27 +01:00
Miklos Vajna
54e4147887 httpwstest: 'emplace_back' is called inside a loop
Pre-allocate the vector capacity before the loop to avoid realloc waste.

Change-Id: I78370d79728ae66446d2b979d376cb50ba3ae864
2018-11-26 09:43:17 +01:00
Miklos Vajna
596f3d14db test: fix HTTPWSTest::testInactiveClient() 2018-11-13 09:12:03 +01:00
Miklos Vajna
8316a650d6 test: avoid some unnecessary value parameters 2018-10-17 09:34:18 +02:00
Michael Meeks
98bb6f420b Make slideshow unit test more verbose.
Change-Id: I8c9764d86962e93155421ce47f48689eb826533a
2018-05-14 12:03:17 +01:00
Tamás Zolnai
ffd7151443 Writer: View jumps to cursor position even if it is moved by an other view.
Need to get the viewid which moved our visible cursor, so we can check
whether it positioned changed by the owner of the cursor or not.

Change-Id: Ie7b1fafc8d8f11fba0c0b0d5f02d755e15284514
Reviewed-on: https://gerrit.libreoffice.org/52571
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-04-10 17:00:21 +02:00
Ashod Nakashian
2562d8919a ut: log the test name for easier traceability
Change-Id: Icbcbb36857b748c2ac2d0d36a5c4c23609f5453a
Reviewed-on: https://gerrit.libreoffice.org/49568
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-11 19:22:14 +01:00
Ashod Nakashian
7be98efd93 ut: log timestamp to track timeouts better
And improve the logging support in unit-tests to
help troubleshoot issues faster and more accurately.
Also makes the code more readable (hopefully).

Change-Id: I4f8aafb5245e2f774b03231591a74544f9ec84aa
Reviewed-on: https://gerrit.libreoffice.org/48645
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-11 19:21:15 +01:00
Ashod Nakashian
31130989ed ut: fix HTTPWSTest::testLoadTortureODP
Change-Id: Ibe3bd98c1cd68da962cc8d93b837597fb7167f45
Reviewed-on: https://gerrit.libreoffice.org/48644
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-11 19:18:38 +01:00
Miklos Vajna
4bcfdbb5b3 test: spell out non-trivial autos to improve readability
Change-Id: Ie3b4b961c50ab61ef63380c4724a0f00e8f960d2
2018-02-07 10:18:12 +01:00
Pranav Kant
f63858433b loplugin:includeform
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-12-20 21:21:05 +05:30
Miklos Vajna
a3d6dee503 Remove unused strings
Change-Id: I621c462bca38222dcf26dfa1e414cf27e1a3e088
2017-11-03 15:25:09 +01:00
Pranav Kant
b97e02bcfc Fix HTTPWSTest::testInactiveClient
Fallback from 3a43f69116

Change-Id: I8840e78bd4deec1edb2e3c4166134ac6ac4b3abf
2017-07-06 19:23:14 +05:30
Michael Meeks
73a87493f0 Use WireIds instead of long hashes to identify tiles efficiently.
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
2017-06-20 21:49:44 +01:00
Michael Meeks
7f08458d95 Make the slideshow SVG validation somewhat less lame.
Change-Id: Ie4853359ba3b43aabe629d0dcabb635d260627b6
2017-06-19 17:27:10 +01:00
Henry Castro
d31e0e3aac wsd: test: undo conflict
Change-Id: Iafdcf3e206a425b7e55cca7818beb620e9d06f85
2017-05-30 22:26:05 -04:00
Miklos Vajna
43eabc09d1 Fix HTTPWSTest::testInsertDelete() failure
.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>
2017-05-22 09:28:42 +02:00
Ashod Nakashian
6d80d669c6 wsd: unittest to reproduce rendering issue in Calc
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>
2017-05-02 06:14:33 +02:00
Ashod Nakashian
647e5f8936 wsd: unittest to reproduce rendering issue in Calc
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>
2017-05-02 06:12:27 +02:00
Ashod Nakashian
876e409835 wsd: unittest for correctly saving in presence of passive clients
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>
2017-04-20 06:44:47 +02:00
Ashod Nakashian
1312cdc918 wsd: fix testSlideShow to accept larger SVG exports
Change-Id: I29f0fb5b4573a7338e7244f8a1d2f9043223bc57
Reviewed-on: https://gerrit.libreoffice.org/36331
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-10 06:09:48 +02:00
Ashod Nakashian
8e91768868 wsd: be more flexible with the svg export test
Change-Id: I4ff645605b911bb8a872894bec9eeed0eff1ae3c
Reviewed-on: https://gerrit.libreoffice.org/36246
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-07 05:55:51 +00:00
Ashod Nakashian
1af96e6c21 wsd: re-enable some passing tests
Change-Id: Ifbbc77d6603e378ab18cb1b92bbca71c76df477d
Reviewed-on: https://gerrit.libreoffice.org/36245
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-07 05:31:49 +00:00
Ashod Nakashian
23f23068dd wsd: fix testSlideShow
Change-Id: I2acf7f0ee509f193b0be46af6ba4363b8aecb98f
Reviewed-on: https://gerrit.libreoffice.org/36244
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-07 04:49:09 +00:00
Ashod Nakashian
bb12de8035 wsd: lower the max number of test docs and connections
Tests should have sensible limits so they don't
go overboard and fail needlessly causing noise.

Change-Id: Idd556c348cc0e97e38c710fdbf76fe20c76d8f9b
Reviewed-on: https://gerrit.libreoffice.org/36241
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-07 04:41:30 +00:00
Jan Holesovsky
fb4fbdd575 Disable the unreliable unit tests.
Change-Id: I1de9cc566b1b88563152aa36a5505867e46ea2af
2017-04-06 16:58:42 +01:00
Ashod Nakashian
9fbd810650 wsd: accept alternative slideshow export
Apparently some setups produce a slightly different
output than the expected. Here we tolerate for those
outputs as well.

Change-Id: Ia4beeb653ff6182e1403a59fbd05c6a46b9277ac
Reviewed-on: https://gerrit.libreoffice.org/36080
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-04 13:07:41 +00:00
Ashod Nakashian
9936ac1869 wsd: fix alertAllUsers test
Issue the fake disk space error
only after fully loading the doc.

This prevents handling the error
while loading, which terminates
the session.

Change-Id: I5acd9454b1aa9fb5d1f886fb23a76a2d808d4852
Reviewed-on: https://gerrit.libreoffice.org/36027
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-03 05:10:51 +00:00
Ashod Nakashian
c25d63b0d4 wsd: more stable testCloseAfterClose test
Change-Id: Iac9392dbe455ddc3e4742a5f239c1f78f2bfe2ac
Reviewed-on: https://gerrit.libreoffice.org/35709
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-26 05:09:48 +00:00
Ashod Nakashian
a085f7998b wsd: more informative testConnectNoLoad and error handling
Change-Id: Ide2c546d1bbe10b8bb0996bd454dcfd4906ba2fe
Reviewed-on: https://gerrit.libreoffice.org/35706
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-26 05:06:58 +00:00
Ashod Nakashian
eab17f4496 wsd: assert response in test instead of failing with exception
Change-Id: I1090ee25ba87acbcbb1c66007fbf3363966952e4
2017-03-20 20:57:50 -04:00
Ashod Nakashian
851195215a wsd: log testHandshake traffic
Change-Id: Iee79dfe2e7987838a528d5705cbb0d476f73dce7
Reviewed-on: https://gerrit.libreoffice.org/35117
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:10:26 +00:00
Ashod Nakashian
57e7d22e28 wsd: logging and formatting cleanup
Change-Id: I5bfbd517c37b6df864d181abe7c70857815b9ece
Reviewed-on: https://gerrit.libreoffice.org/35082
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-11 19:50:08 +00:00
Ashod Nakashian
fa0771921d nb: enable testCloseAfterClose
Change-Id: I4150c547c3859e22c6628cd8d65e470b71d8cad4
2017-03-10 10:47:41 +01:00
Ashod Nakashian
17fc91e220 nb: process POST requests
These are really GET requests that aren't
WebSocket upgrade. Should rename to something
less misleading.

Re-enabled testSlideShow which depended on this.

Change-Id: I52b7f67b650fcdcbae7c2bff020b756099263141
2017-03-10 10:47:41 +01:00
Ashod Nakashian
c845890630 nb: log the test name where possible
Helps troubleshoot failed tests faster.

Change-Id: I12172bcdd46403b902bf440b919916263cb1a02b
2017-03-10 10:47:41 +01:00