Commit graph

50 commits

Author SHA1 Message Date
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
Ashod Nakashian
f08d9c9ec1 nb: handle bad requests with 400 response
Change-Id: I15ecc06a933a88f5ccdd0acfd16aac8b357f29df
2017-03-10 10:47:41 +01:00
Ashod Nakashian
70b5aad1a6 nb: for now disable the broken WS tests
Change-Id: I2fdb5ce976f0c29a89fbcaa4e25a14c73644dd83
2017-03-10 10:47:40 +01:00
Ashod Nakashian
46ccfb165f nb: testLoad -> testLoadSimple
Change-Id: Ief4292f3c7bf8cd6866a83518998d250ebc03355
2017-03-10 10:47:40 +01:00
Ashod Nakashian
6cd1d511be wsd: avoid segfault when handling invalid paste command
The payload of paste can't have length 0.

Now we silently skip such cases, although perhaps we
should be more strict and disconnect the offending
client.

Change-Id: Iaa2e7373277f9e7d85209aec56a2f8ee0ef7e801
Reviewed-on: https://gerrit.libreoffice.org/34112
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-10 07:02:26 +00:00
Pranav Kant
53bdbce4c1 Disable these tiled comment rendering related tests
We have enabled LOK_FEATURE_NO_TILED_ANNOTATIONS flag already
in Kit.cpp, which means these tests, which assume comments are
rendered as tiles, are no longer relevant, so lets disable them
for now. Surely sometime in future they would completely be
removed and replaced by new tests that assume comments are *not*
rendered in tiles and rather are added/modified/removed by using
comments API. See LOK_CALLBACK_COMMENT for details.

Change-Id: I48b7a0a0aa116d164a3654618ab0e95252d29cf3
2017-02-04 22:33:35 +05:30
Ashod Nakashian
e325bc2978 wsd: ensure test doc is closed before reloading
This reduces the chance for random test failures.

Change-Id: I961a502d57a3cb4946b3b7febc6e6b03e7f36aa1
Reviewed-on: https://gerrit.libreoffice.org/33858
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:05:23 +00:00
Ashod Nakashian
0f73bd9bf2 wsd: improved testConnectNoLoad
Change-Id: I8eff5b4862067444c8623582dc4f3baa585f164e
Reviewed-on: https://gerrit.libreoffice.org/33425
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-23 05:41:46 +00:00
Ashod Nakashian
0e5a75c46b wsd: exit the kit only when no more sessions exist
Change-Id: I26cd8876fd564f537dac4fb1748aee5b4dbdff04
Reviewed-on: https://gerrit.libreoffice.org/33114
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-16 01:43:08 +00:00
Tomaž Vajngerl
d24fb462d7 Test password protected OOXML and Binary MSO documents
Change-Id: Ie871ea72f2670bcb23c25697bb669128ded851d9
2017-01-10 12:44:20 +01:00
Ashod Nakashian
a775f5e585 wsd: split testStateUnoCommand one for each app
Change-Id: I4f6275e289c1a64a05df5b5e4c2708b8ab5b3f83
Reviewed-on: https://gerrit.libreoffice.org/32871
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:26:30 +00:00
Ashod Nakashian
b8949715e8 wsd: split testGraphicViewSelection one for each app
Change-Id: I8da3470d4ad9cd666bb4cd18cb8d66a0f6b0c8cb
Reviewed-on: https://gerrit.libreoffice.org/32870
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:25:27 +00:00
Ashod Nakashian
e232ffcdf9 wsd: log unittest duration
Change-Id: I12ed5b3bb776e0dc562dfdddb1d6ffc7f0aedf31
Reviewed-on: https://gerrit.libreoffice.org/32868
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:23:23 +00:00
Ashod Nakashian
bd65ed2f88 wsd: testInsertAnnotationWriter made more stable
Change-Id: I72a531118054b055a997e50168cbd503ea25b9c8
Reviewed-on: https://gerrit.libreoffice.org/32867
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:22:43 +00:00
Ashod Nakashian
2a57df3018 wsd: log the test name in unittests
Change-Id: I2e83699f80ad35c475452b90fa20b46e4e95f450
Reviewed-on: https://gerrit.libreoffice.org/32866
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:21:58 +00:00
Ashod Nakashian
4e9e019564 wsd: refactor/dedup the lokit process counting tests
Change-Id: Iebf7756c6a5c2bc581a0ade4fe13fad752eb7d20
Reviewed-on: https://gerrit.libreoffice.org/32861
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:18:43 +00:00
Ashod Nakashian
496fbda659 wsd: cleanup ColumnRowSize and OptimalResize unittests
Change-Id: I1e4681aeb0ac51df34ca585ddecd53cad47f3fda
Reviewed-on: https://gerrit.libreoffice.org/32859
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:17:19 +00:00
Ashod Nakashian
e6ee7c2756 wsd: MAX_DOCUMENT is now always defined as positive
Change-Id: I06018eeaab88bb3ede896bf7d74e1a7ce6f84325
Reviewed-on: https://gerrit.libreoffice.org/32857
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:15:11 +00:00
Tor Lillqvist
a36d4b0fc3 Reanme png namespace to Png for consistency
As far as I see, we tend to use the same namespace name as the
basename of the corresponding include file, and this stuff is defined
in a file called Png.hpp.

Change-Id: Id859e13e94568abd9f1d5b4ef3bfbbb0c156db11
2017-01-04 13:35:26 +02:00
Ashod Nakashian
73cdebc60c wsd: fixup alert all users unittest
Change-Id: I8d9c7581ed2ae42e180301c38a8775cb8dcb396a
Reviewed-on: https://gerrit.libreoffice.org/32716
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-04 04:33:17 +00:00
Tor Lillqvist
f94d4c789d 'Handshake' is one word
Change-Id: Ibef905cc42a74052738a71bd4743431e30b863d1
2017-01-02 13:29:09 +02:00
Ashod Nakashian
8a20e3b265 wsd: load torture test made more stable
Change-Id: Icc1890480d7d5539dd3b855dfb775909d78a2e82
Reviewed-on: https://gerrit.libreoffice.org/32565
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-01 04:23:13 +00:00
Ashod Nakashian
e9f4e67efd wsd: more testLoadTorture flavors
Dedicated tests for each type of document.

Change-Id: I399e32a64ad0fe25f0cf4795cf428da922eea2f5
Reviewed-on: https://gerrit.libreoffice.org/32564
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-01 04:22:24 +00:00
Ashod Nakashian
2f81b37c07 wsd: load torture test
Load multiple views on multiple documents
concurrently and verify that the number
of views for each case is consistent and
as expected.

Change-Id: Ie550dd42880da7bdd0aef6d642e9b000be5c3f84
Reviewed-on: https://gerrit.libreoffice.org/32556
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-01 03:58:30 +00:00
Noel Grandin
0848882aa7 loplugin:rangedforcopy
Change-Id: Ied12a3d9016845035536b496d73e3fe7e77b4e33
Reviewed-on: https://gerrit.libreoffice.org/32364
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-27 10:21:30 +00:00
Tor Lillqvist
023bde69dc Drop the .uno:MergeCells= thing from HTTPWSTest::testStateUnoCommand
It always failed. No idea why, or what this stuff is. See also
6bd899f3fa44f2d78092333a399e141889b43dca in cp-5.1 which might be
related, or not.

Change-Id: I95f964e3f99c681ec9eefd092e523babd919a5c0
2016-12-27 12:10:17 +02:00
Noel Grandin
02472514a3 loplugin:implicitboolconversion
the change in UnitPrefork.cpp looks like it might fix something
important

Change-Id: I95741c0256b22ac0bb4caadbd113b96584f784b5
Reviewed-on: https://gerrit.libreoffice.org/32343
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-22 14:54:56 +00:00
Noel Grandin
4ed820d3d5 add a configure option for using clang compiler plugins
and apply the nullptr plugin.

Lots of hacking in my LO tree required to make this work, will probably
end up needing to add an extra parameter to the LO side.

Change-Id: I02ae1dcdece9d9ddf05f7757f6696e3a5d7d1f14
Reviewed-on: https://gerrit.libreoffice.org/32339
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-22 14:23:42 +00:00
Michael Meeks
c1a398977f Adapt makefiles, includes etc. to new locations. 2016-11-25 09:58:57 +00:00
Michael Meeks
cca657c8f2 Apply the pre-branch rename script to re-organize the source. 2016-11-25 09:58:48 +00:00
Renamed from loolwsd/test/httpwstest.cpp (Browse further)