summaryrefslogtreecommitdiff
path: root/test/UnitWOPIWatermark.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-06-02wsd: move LOOLProtocol::tokenize to Util::tokenizeAshod Nakashian1-1/+1
The tokenizer(s) are more generic than the protocol logic, and are used from contexts that don't involve the protocol as such. Change-Id: Ie8c256bf11a91e466bff794021f41603c9596a7f
2020-02-28Rework LOOLProtocol::tokenize() to return a StringVector objectMiklos Vajna1-1/+1
The bulk of this commit just changes std::vector<std::string> to StringVector when we deal with tokens from a websocket message. The less boring part of it is the new StringVector class, which is a wrapper around std::vector<std::string>, and provides the same API, except that operator[] returns a string, not a string&, and this allows returning an empty string in case that prevents reading past the end of the underlying array. This means in case client code forgets to check size() before invoking operator[], we don't crash. (See the ~3 previous commits which fixed such crashes.) Later the ctor could be changed to take a single underlying string to avoid lots of tiny allocations, that's not yet done in this commit. Change-Id: I8a6082143a8ac0b65824f574b32104d7889c184f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89687 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-13killpoco: removed StringTokenizer from test directoryPranam Lashkari1-1/+1
removed use of Poco::StringTokenizer from the test directory using LOOLProtocol::tokenize and std::vecor<std::string> Change-Id: I20fc2e0ef0d0d8fc959fee7972aa095f2581c181 Reviewed-on: https://gerrit.libreoffice.org/82565 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-10Added Unit Test for new Watermarking featuremert1-0/+158
Change-Id: Id30015731d7ea562bfeb63fc70ffc6813945e492 Reviewed-on: https://gerrit.libreoffice.org/81674 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>