We had an issue with loading two views to the same document
at the same time.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I8b1ba92eca5e59bfa50cbcd637f1076d5e15c664
The issue is that we passed viewinfo messaged to do _docLayer
in wrong order because of the too simple delaying mechanism.
Wrong scenario steps:
viewinfo-1 arrives: _docLayer is not initialized yet -> 100 ms delay.
viewinfo-2 arrives: _docLayer is initialized now -> pass to _docLayer.
viewinfo-1's timeout: _docLayer is initialized now -> pass to _docLayer
Better to use the more sophisticated delaying method.
See _tryToDelayMessage() and related methods. They keep the order
of the messages.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I335b350b1553cfdee573f7d2e57c86c4b8f9af84
This reverts commit f6bf6f49ed. I did not
consider that this makes it harder to do a local developer setup with
reverse proxy + make run; also that if you don't read the doc to set up
a reverse proxy, then the default now serves http content and advertises
https, which is not helping sysadmins.
This needs more thinking how to improve one scenario without hurting
others.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic789faa2dc5bb19a79d651dc81d4eaaf0b48607a
Before this commit failure logs were gathered inside an error log
file and they were displayed after all tests are finsihed.
After this commit we print this failures logs when the error occurs
and also at the end of the test run. Sometimes Jenkins does not finish
the whole build because of timeout abortion. In this case, it would
be helpful to see some failure logs.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ibe7cb6aa2c9f99912d604c4b642cda363352ffcd
Move the connect function into the NetUtil
translation unit to aid using it for the
upcoming async socket logic.
The NetUtil should also come in handy for
the miscellaneous network helpers we have.
Change-Id: I2ee0c6e3e1769fd87572d7407d3b4979b59ffe6a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
When we simulate socket error it's hard to understand
what is going on, since there is no real errno to
explain the -1 return value. This is at least true
in the SSL case where we don't set errno (perhaps
we should?). At any rate, it's good form to log
that we are messing up with the return value and
that the real socket API hasn't been even invoked.
Change-Id: Ib76f0259dbdcfe0cfae97343c11ca45461079fa1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This code is executed regularly, at every poll.
The config getter internally throws exceptions,
catches and handles, before returning. While
this isn't performance sensitive, it is noisy
to have such poor-behaving code executed
frequently and regularly.
But the real motivation is the pain this exception
causes when debugging an exception. GDB ends up
catching this rogue exception, which is hardly
useful or helpful.
At any rate, we don't need to get a config entry
more than once, as they can't change during the
lifetime of the process.
Change-Id: Ic69fb94674b74b298987131d44d9baa27e9fa4aa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
- iconview fix layout without using hard-coded margins
- fontwork: make sure the elements start at the same left position as the title and that they occupy the dialog evenly
- hide unnecessary label
- space-around when on mobile
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia92acf1cbf09a3e7c6e996f9a846163835b115af
cy.click() will grab the focus to the textarea.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I20f0df2fd8a31d3ff4b85ba38fdc503c10987dbb
Add support for configuring the SSL certificates
when running the test binary as well as setting
up the SSL context.
Also adds the SSL socket headers with proper
compile-time guards for when SSL is disabled.
Change-Id: I99992639a66a64871f8ff8a2b2105279ead63ca1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Technically, the poll interval should be
irrelevant because the tests should wakeupWorld
when they need to break the poll. However, it
turns out that many tests implicitly rely on
the poll interval to be large, and if for
any reason the poll wakes up, the tests either
advance their phase too soon, or assert, causing
random failures and reliability issues.
As the tests should now be more robust (at
least the ones that were non-deterministic
in this way), we can now lower the interval
to catch other cases (either extant or in the
future).
Change-Id: Id0d472e70875db8669bb21c6582b0d5052b19bfb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This introduces a new macro, WSD_CMD,
used in tests only, to send a command
while logging it and its file/line of
origin.
Makes the tests more readable and the
logs more informative.
Only a handful of tests updated.
Change-Id: I55a38b35d7140a1f31f20c3c904d7eff6b19346f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This makes the test more deterministic and simpler.
We should only modify the document after it's fully
loaded. After that, we can immediately restore the
version. So we really only need three phases and
the onDocumentLoaded callback.
Change-Id: Ic59c9d4c8e03edb8e80853daf482a6c065e7c015
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We only modify the document after it has fully loaded.
Otherwise, we risk intermittent failures due to timing
issues with when the modify commands are processed.
It's also more readable this way.
Notice that we do close the document right after
sending the modify commands. This is to test that
the modification is actually registered and is
visible when the close command is processed.
This is the whole point of this test in the first place.
Change-Id: Id3bd598b9416be901a73d6cf804563d81a245ebb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We avoid relying on poll timing for the different
phases, instead we use the document events callbacks
to trigger the different phases of the test.
This improves the reliability of the test and makes
it more readable.
Change-Id: Ief3374acf823a89dca1412ff808cc09095f8e2e5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This makes the test less reliable on the timing of the
poll that pumps the phases by using the proper callbacks
for the different document events.
We need to wait until the document is fully loaded before
we modify it. Here we do that in onDocumentLoaded.
Change-Id: Ibf4a5b5601449b729b1e62b621f82c1957eb8a65
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This allows the UnitBase class to handle the messages
and dispatch to convenient handlers. This simplifies
the implementation of unit-tests and makes the
parsing more centralized than it is now.
Change-Id: Ice8f169ecfd12d49ee7cbd4fb9021a163b14f4ba
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
And introduce passTest and failTest to log a reason
and be more informative when reading logs.
Change-Id: I5090793b802a29135de8ea3783a457e189cc7df3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The intention is to have defaults which are close to how people
typically use Online in production.
However, keep using ssl for 'make run', so that the https environment in
the browser is unchanged.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I7fd725a83b0e9ca1012f2c0e0c3bf038e5fa0059
Now we have it in the general calc helper file.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Id7f12441b9612a630f6b348a9e6db6235f4b6c45
* and fix error reporting: we do not abort every time when loolforkit
is invoked with incorrect user name
* and better readability of the conditions
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Idc9db40c00d41c95160db130eb324c487f14de17
While UserFriendlyName is an optional field
in the WOPI protocol, Core needs it for
the Author of the document. When it's blank
the Author is not set and the document fails
to load.
By default we are at least able to load the
document with a sensible placeholder for the
Author. Meanwhile, we log a warning to let
the integrators know of the issue.
Documentation updated.
Change-Id: I4dd2c9d164b4d889f85701a4a27ee8d395bff220
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>