diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-19 15:17:14 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-19 19:06:16 +0200 |
commit | b86b78e0ad9bb1e6ed2e22a0fca18cad8d19ded1 (patch) | |
tree | 7b6af5c892ee6b87d5c73df148cfc2d2d20dc283 /desktop/qa | |
parent | e91a1abe4c53ea3a1ac59e3c1d5dddf98141a4ee (diff) |
Revert "CppunitTest_desktop_lib: add ModifiedStatus callback testcase"
This reverts commit cdf08b3aa74bb32ea18b583a9c0c41b91d7819ac. It breaks
'make -sr CppunitTest_desktop_lib
CPPUNIT_TEST_NAME="DesktopLOKTest::testPaintPartTile
DesktopLOKTest::testWriterCommentInsertCursor" VALGRIND=memcheck' (it is
terminated by SIGSEGV), and also it's the reason why sometimes the
lo_ubsan buildbot fails, see e.g.
<http://ci.libreoffice.org/job/lo_ubsan/329/console>.
This has to be re-introduced once I find a way to process all binding
updates at once without side-effects.
Conflicts:
desktop/qa/desktop_lib/test_desktop_lib.cxx
sfx2/source/control/bindings.cxx
Change-Id: Id6c49b9b31095ef1a1a8c1cd92cbae5deb316500
Diffstat (limited to 'desktop/qa')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index d71df17790eb..1c92165bf25b 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -91,7 +91,6 @@ public: void testCellCursor(); void testCommandResult(); void testWriterComments(); - void testModifiedStatus(); void testSheetOperations(); void testSheetSelections(); void testContextMenuCalc(); @@ -124,7 +123,6 @@ public: CPPUNIT_TEST(testCellCursor); CPPUNIT_TEST(testCommandResult); CPPUNIT_TEST(testWriterComments); - CPPUNIT_TEST(testModifiedStatus); CPPUNIT_TEST(testSheetOperations); CPPUNIT_TEST(testSheetSelections); CPPUNIT_TEST(testContextMenuCalc); @@ -755,66 +753,6 @@ void DesktopLOKTest::testWriterComments() comphelper::LibreOfficeKit::setActive(false); } -void DesktopLOKTest::testModifiedStatus() -{ - LibLibreOffice_Impl aOffice; - comphelper::LibreOfficeKit::setActive(); - LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); - pDocument->pClass->initializeForRendering(pDocument, nullptr); - pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this); - - // Type "t" and check that the document was set as modified - m_bModified = false; - m_aStateChangedCondition.reset(); - pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 't', 0); - Scheduler::ProcessEventsToIdle(); - TimeValue aTimeValue = { 2 , 0 }; // 2 seconds max - m_aStateChangedCondition.wait(aTimeValue); - Scheduler::ProcessEventsToIdle(); - - // This was false, there was no callback about the modified status change. - CPPUNIT_ASSERT(m_bModified); - - // Perform SaveAs with "TakeOwnership" option set, and check that the - // modification state was reset - m_aStateChangedCondition.reset(); - utl::TempFile aTempFile; - aTempFile.EnableKillingFile(); - CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "odt", "TakeOwnership")); - Scheduler::ProcessEventsToIdle(); - m_aStateChangedCondition.wait(aTimeValue); - Scheduler::ProcessEventsToIdle(); - - // There was no callback about the modified status change. - CPPUNIT_ASSERT(!m_bModified); - - // Modify the document again - m_aStateChangedCondition.reset(); - pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 't', 0); - Scheduler::ProcessEventsToIdle(); - m_aStateChangedCondition.wait(aTimeValue); - Scheduler::ProcessEventsToIdle(); - - // There was no callback about the modified status change. - CPPUNIT_ASSERT(m_bModified); - - /* - // TODO: move this to a test where LOK is fully bootstrapped, so that we can - // get back the notification about ".uno:Save" too - // Now perform a normal "Save", and check the modified state was reset - // again - m_aStateChangedCondition.reset(); - pDocument->pClass->postUnoCommand(pDocument, ".uno:Save", nullptr, false); - m_aStateChangedCondition.wait(aTimeValue); - Scheduler::ProcessEventsToIdle(); - - // There was no callback about the modified status change. - CPPUNIT_ASSERT(!m_bModified); - */ - - comphelper::LibreOfficeKit::setActive(false); -} - void DesktopLOKTest::testTrackChanges() { // Load a document and create two views. |