diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-30 18:36:08 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-31 08:08:12 +0200 |
commit | 95b51c5792a8d71b079eac42d6439abaa15e44e8 (patch) | |
tree | a584ce1d9eac178428d65c6f956fbd0969a46856 /unotest | |
parent | 24d64dab16c751df25f2a2937f9e819c88a2e9dd (diff) |
Exclude some tests in Windows RDP session
It seems that RDP may change (limit?) color space (even configured
to use 32-bit colors), and then some tests start failing like this:
Test name: BackendTest::testDrawAlphaBitmapMirrored
equality assertion failed
- Expected: c[80000000]
- Actual : c[84000000]
Debugging ImplDrawBitmap in vcl/win/gdi/gdiimpl.cxx, and adding a
call to GetPixel immediately after the call to StretchDIBits, shows
that the resulting color on the device is different from the color
in the bitmap data: e.g., for original color {128, 0, 0} the result
is {132, 0, 0}.
Calling GetColorAdjustment shows that there's no color adjustments
set for the device, so I can't detect or modify the behavior this
way. So just disable the tests for now when running in RDP sessions.
Change-Id: Ie89d07f18f53e56bed6f7fa58432b8575b4d9f12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113388
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113355
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unotest')
-rw-r--r-- | unotest/source/cpp/bootstrapfixturebase.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx b/unotest/source/cpp/bootstrapfixturebase.cxx index 5c5b3bcc3a9c..5eb5b91dcaf0 100644 --- a/unotest/source/cpp/bootstrapfixturebase.cxx +++ b/unotest/source/cpp/bootstrapfixturebase.cxx @@ -13,6 +13,10 @@ #include <comphelper/processfactory.hxx> #include <basic/sbstar.hxx> +#if defined _WIN32 +#include <systools/win32/uwinapi.h> +#endif + using namespace ::com::sun::star; // NB. this constructor is called before any tests are run, once for each @@ -32,4 +36,13 @@ void test::BootstrapFixtureBase::setUp() void test::BootstrapFixtureBase::tearDown() { StarBASIC::DetachAllDocBasicItems(); } +bool test::BootstrapFixtureBase::isWindowsRDP() const +{ +#if defined _WIN32 + return GetSystemMetrics(SM_REMOTESESSION); +#else + return false; +#endif +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |