diff options
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 62 | ||||
-rw-r--r-- | sfx2/source/control/bindings.cxx | 4 |
2 files changed, 1 insertions, 65 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. diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 04d625a50b59..4562cc1d8063 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1470,9 +1470,7 @@ bool SfxBindings::NextJob_Impl(Timer * pTimer) } // if possible Update all server / happens in its own time slice - // but process all events at once when unit testing, for reliability reasons - static bool bTest = getenv("LO_TESTNAME"); - if ( pImpl->bMsgDirty && !bTest ) + if ( pImpl->bMsgDirty ) { UpdateSlotServer_Impl(); return false; |