diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-03-19 15:17:42 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-04-05 00:30:18 +0200 |
commit | 5e53fe7b53017068d183e923f6a77f0afaf31d67 (patch) | |
tree | 954953ef1686ad0a1ebe7642889465304b09375a /vcl/qa/cppunit/lifecycle.cxx | |
parent | 88d3172f170fcb2e49d832b80444fd16b818deed (diff) |
VCL drop Scheduler::ProcessTaskScheduling
Just process tasks (and system events) via DoYield and actually
wake up the system timer on OSX.
This drops the testFocus unit test. There is some comment about
it in README.lifecycle, but the test's CPPUNIT_ASSERT was already
commented and mmeeks suggested to simply drop it.
Even worse: just replacing
- Scheduler::ProcessTaskScheduling();
+ Scheduler::ProcessEventsToIdle();
results in a SIGSEGV in my local Linux build, which is a totally
unrelated crash.
Change-Id: Ie3e2a8668b8501f081706dde0ba3684801c30cc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112761
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qa/cppunit/lifecycle.cxx')
-rw-r--r-- | vcl/qa/cppunit/lifecycle.cxx | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx index 6cdbbe0819d6..bf1ee3575e62 100644 --- a/vcl/qa/cppunit/lifecycle.cxx +++ b/vcl/qa/cppunit/lifecycle.cxx @@ -37,7 +37,6 @@ public: void testParentedWidgets(); void testChildDispose(); void testPostDispose(); - void testFocus(); void testLeakage(); void testToolkit(); @@ -49,7 +48,6 @@ public: CPPUNIT_TEST(testParentedWidgets); CPPUNIT_TEST(testChildDispose); CPPUNIT_TEST(testPostDispose); - CPPUNIT_TEST(testFocus); CPPUNIT_TEST(testLeakage); CPPUNIT_TEST(testToolkit); CPPUNIT_TEST_SUITE_END(); @@ -190,47 +188,6 @@ void LifecycleTest::testPostDispose() namespace { -class FocusCrashPostDispose : public TabControl -{ -public: - explicit FocusCrashPostDispose(vcl::Window *pParent) : - TabControl(pParent, 0) - { - } - virtual bool PreNotify( NotifyEvent& ) override - { - return false; - } - virtual bool EventNotify( NotifyEvent& ) override - { - return false; - } - virtual void GetFocus() override - { - CPPUNIT_FAIL("get focus"); - } - virtual void LoseFocus() override - { - CPPUNIT_FAIL("this should never be called"); - } -}; - -} - -void LifecycleTest::testFocus() -{ - ScopedVclPtrInstance<WorkWindow> xWin(nullptr, WB_APP|WB_STDWORK); - ScopedVclPtrInstance< FocusCrashPostDispose > xChild(xWin); - xWin->Show(); - xChild->GrabFocus(); - // process asynchronous ToTop - Scheduler::ProcessTaskScheduling(); - // FIXME: really awful to test focus issues without showing windows. - // CPPUNIT_ASSERT(xChild->HasFocus()); -} - -namespace { - template <class vcl_type> class LeakTestClass : public vcl_type { |