summaryrefslogtreecommitdiff
path: root/libreofficekit/qa/unit
AgeCommit message (Collapse)Author
2019-03-28simplify reset(nullptr) -> reset()Noel Grandin
Change-Id: Iec5e93d9c59dde44571376e46fb98ea854e16b6c Reviewed-on: https://gerrit.libreoffice.org/69784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13lok: keystroke attribution issue.Michael Meeks
Change-Id: I7e5ed3c72fef12d31b5500acffff622b5f4129de Reviewed-on: https://gerrit.libreoffice.org/66931 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-01-25lok: calm down CnP issues & simplify.Michael Meeks
Change-Id: I67669b9b3accbcf89bddf3b8dc8435edba89224b Reviewed-on: https://gerrit.libreoffice.org/66925 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-05-05Fix typosAndrea Gelmini
Change-Id: I92078fdece135754744d85424956dbb071f3899e Reviewed-on: https://gerrit.libreoffice.org/53638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-15move Bitmap::ScopedWriteAccess inside vclNoel Grandin
would have liked to make the AcquireWriteAccess methods DLLPRIVATE, but they are needed by the workbench and testing code Change-Id: I22497788eb68dfb84b7e542e5ef53322892a5274 Reviewed-on: https://gerrit.libreoffice.org/51310 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-27Fix build, for real this timePranav Kant
Add a few missing processEventsToIdle()'s in the tests. Let's disable one of the assertion until I figure out what's going on. Change-Id: I82cbe443b4013d4402151ddae4b06044dfb394bd
2018-01-14Fix typosAndrea Gelmini
Change-Id: I2b4988e1d81fe60f7699362480cd739d2620c053 Reviewed-on: https://gerrit.libreoffice.org/47856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-04-12CppunitTest_libreofficekit_tiledrendering: disable occasionally failing testMiklos Vajna
When it failed, it always failed like this: libreofficekit/qa/unit/tiledrendering.cxx:311:TiledRenderingTest::runAllTests equality assertion failed - Expected: 3 - Actual : It's not clear yet what triggers the failure, sounds like some kind of timing. Change-Id: Ib5f44523f9a29c892aeda9eb881f452b57adb8a8 Reviewed-on: https://gerrit.libreoffice.org/36445 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-11CppunitTest_libreofficekit_tiledrendering: add more processEventsToIdle callsMiklos Vajna
With this the test passes for me 10 times in a row, while previously it failed from time to time, hopefully this fixes the false negatives. Change-Id: I233276ddfe4e9d8c86557f7f1c29d997f2fb51f6 Reviewed-on: https://gerrit.libreoffice.org/36420 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-06lokit: compile-test a plain C versionThorsten Behrens
Change-Id: Ibe2108984df8f4fef9ed681941d517ca9ad9479c Reviewed-on: https://gerrit.libreoffice.org/36177 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-28Use symbolic names for keys from css::awt::KeyTor Lillqvist
Change-Id: Iee2f4540cddeb05fcf0ae2ecadf7de8fbb4e3a0d
2017-03-24lok: Unit test for setting of the language during load of the document.Jan Holesovsky
Change-Id: Idf4d3ba6b55be1f885f9d8fc89157e7e498d4e42
2017-03-21lok: Fix crash in paintPartTile() when the current view was destroyed.Jan Holesovsky
Change-Id: I59b71ee6815cbcfa4c8b5f68ae6dc9299856d49e Reviewed-on: https://gerrit.libreoffice.org/35494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-01-27CppunitTest_libreofficekit_tiledrendering: fix cppunitassertequals warningsMiklos Vajna
Change-Id: I0fce00d4c794918e5b14b2c4f3f9f36231f28718 Reviewed-on: https://gerrit.libreoffice.org/33604 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-03-08New LOK_LOADLIB_GLOBAL to let clients control dlopen(RTLD_GLOBAL)Stephan Bergmann
...in LibreOfficeKintInit.h's lok_loadlib, now that RTLD_GLOBAL isn't only needed for UBSan (62b124b2704adf11a63681164d05a8eb49dfb105 "Ensure RTTI symbol visibility for Linux Clang -fsanitize=function,vptr") but also for -stdlib=libc++ on Linux (see <https://whatofhow.wordpress.com/2016/03/01/libclibcabi-on-linux/>). Change-Id: I24ed6612c3d922eba695423d46af5635c77f7077
2015-12-07Let LIBO_INTERNAL_ONLY imply LOK_USE_UNSTABLE_APIMiklos Vajna
Change-Id: Ifbed5e534ba79d32b7188bb7fb7108338b6e124d
2015-11-10Add a check for non-LIBO_INTERNAL_ONLY, C++03-compatible LibreOfficeKit.hxxStephan Bergmann
Change-Id: I56336b8163de48e424526f5f426c2ad350292627
2015-11-04yyyyyNoel Grandin
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-09-17boost->stdCaolán McNamara
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
2015-09-09LOK: moved the decalaration of LibLODocument_Impl to make it visibleMihai Varga
We needed a better way to test LOK methods that are not app specific, but are defined in /desktop/source/lib/init.cxx. So the decalaration needs to be visible. I also moved the `getStyles` test in the new test file Change-Id: I98d97dc17a66e72732ca7bd848c131610790f48e
2015-09-04Revert "LOK: added a general getCommandValues method"Mihai Varga
This reverts commit 9640dcea46dd3201aa4c27f6a3918f7419288a2a.
2015-09-04LOK: added a general getCommandValues methodMihai Varga
This method returns a JSON mapping of the posible values for the given command (e.g. .uno:StyleApply, etc). returns: {commandName: "cmdName", commandValues: {json_of_cmd_values}} Change-Id: Ic8f970d077af6be9bc226f72f725b6cdf2d4c160
2015-08-18lok::Document getStyles methodMihai Varga
This method returns a JSON mapping of style families to a list of styles from the corresponding family. Will be used to know and apply styles in tiledrendering. Change-Id: I0aa395c40b9573920ade44255f97c077475ae5f1
2015-07-27tiledrendering: added getPartName method for calcMihai Varga
This method is used to get the sheet's name and to display it in the tabs (sheet selector) I've also added an unit test for it and uncommented a similar one Change-Id: Ia866815c594a873812c71a6c86e303c869e1f093 Reviewed-on: https://gerrit.libreoffice.org/17294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2015-06-17Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe
This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-11CppunitTest_libreofficekit_tiledrendering: add postUnoCommand() testcaseMiklos Vajna
This fails without commit d4a12421f2b0aafe97f8ab78017261969c36ae0e (desktop: pJSON may be 0 in jsonToPropertyValues(), 2015-04-29). Change-Id: I08fffe65eb6cdc94fcfc57c2b8f1ec9fa546f70d
2015-04-09Use comphelper::LibreOfficeKit::isActive() instead of LOK_TEST env varTor Lillqvist
Change-Id: Iaa0c751f101df6db25e9fca9123b81ac63033159
2015-03-11Ensure RTTI symbol visibility for Linux Clang -fsanitize=function,vptrStephan Bergmann
The problem being that any lib later loaded via osl_loadModule (e.g., libgcc3_uno.so) would not bind to the same global (RTTI-related) symbols as libsofficeapp.so and its dependencies (so, e.g., -fsanitize=function would erroneously assume that bridges/source/cpp_uno/shared/component.cxx's uno_initEnvironment is called with a different, non-matching uno_Environment type). Change-Id: I08b0cbc1f9eb74641eb617c46587a0a528a56c31
2015-03-10Fix CppunitTest_libreofficekit_tiledrendering dependenciesStephan Bergmann
Remove the unnecessary ones, but make sure that e.g. the sofficeapp library is built (which was not covered by depending on services.rdb). Change-Id: I1adfa4aaaf60787c944d71cc289cdafba8351c1b
2015-03-09Fix Ubuntu Precise build: non-static member initJan-Marek Glogowski
gcc 4.6 reports: sorry, unimplemented: non-static data member initializers Moves the initialization into the constructors initializer list. Change-Id: Id25ac042aa3207135edda2485d3c5fe8f98652af
2015-03-09Fix Linux baseline buildMiklos Vajna
1) One more place in desktop that missed the LOK_TEST check. 2) One testcase currently fails on baseline, disabled for now, need to check later. Change-Id: I8c8bcf2cec1618e39e8453120755dffd3feb79ce
2015-03-09CppunitTest_libreofficekit_tiledrendering: fix up and enable this againMiklos Vajna
The main problem was that UserInstallation did not point to the usual workdir/unittest/, so initialization failed early, not finding the soffice.cfg directory under workdir/CppunitTest/libreofficekit_tiledrendering.test.user/. Disable one testcase that still fails, though. Change-Id: I3fdae5ead47dd2a805a0ed8d3cb407938f868e3b
2015-01-07fdo#84938: convert STREAM_ #defines to 'enum class'Noel Grandin
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2014-12-04Make common paths member variables.Andrzej Hunt
We'll need these for other tests too. Change-Id: Ia99c2e60f5e5bb24a83875a9dcf85a6b4f54beb4
2014-07-31LOK: add document loading failure test.Andrzej Hunt
We don't really have any way of telling the client that the file didn't exist yet though, so not very useful so far. Change-Id: I1db386781b88b345f3e9cb4f37838ca1d95f92f9
2014-07-31LOK: add test for getDocumentType.Andrzej Hunt
Change-Id: I264567f73dae9ecd061e09c4413857f793fcac48
2014-07-31LOK: add slide name retrieval test.Andrzej Hunt
Change-Id: I6d2bc4dfa634223da662af6f7c9a91f06cfe7534
2014-07-31Use one test instance to run all LOK tests.Andrzej Hunt
Recreating Office instances after destruction (when still within the same process) currently fails, hence we need to do all tests at once for now. Change-Id: Ic7652c909e1cd970fe1ee76995e61fb6aae8f96c
2014-07-31Make common paths member variables.Andrzej Hunt
We'll need these for other tests too. Change-Id: Ia99c2e60f5e5bb24a83875a9dcf85a6b4f54beb4
2014-07-29Kill the libreofficekit static library / shim.c.Andrzej Hunt
It looks like the cleanest method of getting lok_init into a LibreOfficeKitInit.h header (in a c89 compatible way) is to have it as a static function. (inline is only available in C99 or later -- this is actually available on Linux which is the only place that we can actually use lok_init anyways currently, however given we have to keep c89 for the C code (for MSVC) compatibility, selectively enabling c99 would likely be more messy.) Change-Id: I0493e7a68ed5397479220bb6ba8c3db870b6dd32
2014-07-28Use CPPUNIT_ASSERT instead of assert.Andrzej Hunt
Change-Id: I24e7934002ebdde208db74ae3308b26875a3155b
2014-07-26libreofficekit_tilederendering: test all 4 tiles.Andrzej Hunt
The use of VisPortChgd ensures that the tiles all render as expected, i.e. that the pixels match 1:1 irrespective of actual tile size (for identical zoom factors and document areas). Change-Id: Ib1e1df4f8257546c2f7993a8160c309a52037d8b
2014-07-17libreofficekit_tiledrendering test: force lock file removalAndrzej Hunt
If the lock file still exists when running this test, LOK will fail resulting in "documentLoad failed: unknown load failure" (the actual error is that the lock file dialog cannot be confirmed by the user in headless mode, resulting in loading failure, however this is then hidden by multiple layers of exception redirection in sfx2). Change-Id: I025ea6187c3d17805f25ab6f756eae9646f2c7c8
2014-07-17Add png dumping to LOK tiled rendering test.Andrzej Hunt
This allows for easier visual comparisons (i.e. currently the test would be failing for some tiles). Change-Id: I5b174375b57ffe0edd2700fdec411a83669e4a34
2014-07-17Fix some CppunitTest_libreofficekit_tiledrendering related problemsMatúš Kukan
Change-Id: Icdcde0af1b3d5744ef2842e4b4d2b85a094ac686
2014-07-14LOK tiled rendering test: add some debug output.Andrzej Hunt
Change-Id: I0da29204809b6a1de42d5f0fc37705497a060493
2014-07-12Add LOK tiled rendering divided-tile unit test.Andrzej Hunt
I.e. we render the same area as one larger tile, and then as 4 sub-tiles (which, when put together, should be identical to the larger tile). However currently only the top-left sub-tile actually matches the larger tile, so we have to disable the test for the remaining sub-tiles. Change-Id: If1130022b43898e20fefff3e9f592102da3e413a