desktop/qa/desktop_lib/test_desktop_lib.cxx | 2 sd/qa/unit/tiledrendering/tiledrendering.cxx | 118 --------------------------- 2 files changed, 6 insertions(+), 114 deletions(-)
New commits: commit 5fd55f1e9fb37c3e0ac84823ff089906cd47aca2 Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Thu Apr 25 06:06:19 2019 +0200 Commit: Ashod Nakashian <ashnak...@gmail.com> CommitDate: Thu Apr 25 14:15:29 2019 +0200 Revert "disable unreliable SdTiledRenderingTest::testPasteTextOnSlide" This shouldn't be necessary after the patch that removes the .uno:LeftPaneImpress and revert of the unit test changs. This reverts commit 23b03b5e21d936d1fdb2096c1c57b932a1c6f9e3. Change-Id: Ie056d66b1d88c317e1b44ebe290313c307d807ae Reviewed-on: https://gerrit.libreoffice.org/71273 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index c80ea10db842..1765db27be7d 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2081,7 +2081,6 @@ void SdTiledRenderingTest::testTdf115783() void SdTiledRenderingTest::testPasteTextOnSlide() { -#if 0 // Load the document. comphelper::LibreOfficeKit::setActive(); SdXImpressDocument* pXImpressDocument = createDoc("paste_text_onslide.odp"); @@ -2143,7 +2142,6 @@ void SdTiledRenderingTest::testPasteTextOnSlide() CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(7393), aPos.getY(), 100); comphelper::LibreOfficeKit::setActive(false); -#endif } void SdTiledRenderingTest::testTdf115873() commit 59e8d4679a2104e329ca562d6c4ad5a2b7113793 Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Wed Apr 24 22:16:52 2019 +0200 Commit: Ashod Nakashian <ashnak...@gmail.com> CommitDate: Thu Apr 25 14:15:18 2019 +0200 Revert "sd: fix unittest failures due to enabling slide-sorter" At the moment, the commit that was supposed to fix the unit tests is actually breaking them for me, so let's revert. This reverts commit 72da60a4fac5657de69c0651dd8e0a94fcc49b97. Change-Id: I8ea636985de12ea19ad32a6064ece2d90589b7f9 Reviewed-on: https://gerrit.libreoffice.org/71272 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index ef83adc8f3e3..a952dcd0a0a0 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -1896,6 +1896,8 @@ void DesktopLOKTest::testPaintPartTile() //CPPUNIT_ASSERT(aView1.m_bTilesInvalidated); mxComponent.clear(); + + comphelper::LibreOfficeKit::setActive(false); } void DesktopLOKTest::testWriterCommentInsertCursor() diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index b2f6a59f43cd..c80ea10db842 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2087,55 +2087,6 @@ void SdTiledRenderingTest::testPasteTextOnSlide() SdXImpressDocument* pXImpressDocument = createDoc("paste_text_onslide.odp"); CPPUNIT_ASSERT(pXImpressDocument); - // Drain events. - Scheduler::ProcessEventsToIdle(); - - pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, - convertMm100ToTwip(0), convertMm100ToTwip(0), - 1, MOUSE_LEFT, 0); - pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, - convertMm100ToTwip(0), convertMm100ToTwip(0), - 1, MOUSE_LEFT, 0); - Scheduler::ProcessEventsToIdle(); - - // select second text object - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::TAB); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::TAB); - Scheduler::ProcessEventsToIdle(); - - // step into text editing - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, '1', 0); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, '1', 0); - Scheduler::ProcessEventsToIdle(); - - // select full text - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - Scheduler::ProcessEventsToIdle(); - - // Click on the title text to select it. - const long xPos = 0; - const long yPos = 50; - pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, - convertMm100ToTwip(xPos), convertMm100ToTwip(yPos), - 1, MOUSE_LEFT, 0); - pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, - convertMm100ToTwip(xPos), convertMm100ToTwip(yPos), - 1, MOUSE_LEFT, 0); - Scheduler::ProcessEventsToIdle(); - // select second text object pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::TAB); @@ -2188,8 +2139,8 @@ void SdTiledRenderingTest::testPasteTextOnSlide() CPPUNIT_ASSERT(pTextObj); CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TEXT), pTextObj->GetObjIdentifier()); Point aPos = pTextObj->GetLastBoundRect().TopLeft(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(6591), aPos.getX(), 100); - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(7430), aPos.getY(), 100); + CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(12990), aPos.getX(), 100); + CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(7393), aPos.getY(), 100); comphelper::LibreOfficeKit::setActive(false); #endif @@ -2258,21 +2209,9 @@ void SdTiledRenderingTest::testCutSelectionChange() sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this); - - // Drain events. - Scheduler::ProcessEventsToIdle(); - - pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, - convertMm100ToTwip(0), convertMm100ToTwip(0), - 1, MOUSE_LEFT, 0); - pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, - convertMm100ToTwip(0), convertMm100ToTwip(0), - 1, MOUSE_LEFT, 0); Scheduler::ProcessEventsToIdle(); - // select second text object - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::TAB); + // Select first text object pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::TAB); Scheduler::ProcessEventsToIdle(); @@ -2282,53 +2221,7 @@ void SdTiledRenderingTest::testCutSelectionChange() pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, '1', 0); Scheduler::ProcessEventsToIdle(); - // select full text - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - Scheduler::ProcessEventsToIdle(); - - // Click on the title text to select it. - const long xPos = 0; - const long yPos = 50; - pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, - convertMm100ToTwip(xPos), convertMm100ToTwip(yPos), - 1, MOUSE_LEFT, 0); - pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, - convertMm100ToTwip(xPos), convertMm100ToTwip(yPos), - 1, MOUSE_LEFT, 0); - Scheduler::ProcessEventsToIdle(); - - // select second text object - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::TAB); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::TAB); - Scheduler::ProcessEventsToIdle(); - - // step into text editing - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, '1', 0); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, '1', 0); - Scheduler::ProcessEventsToIdle(); - - // select full text - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); - pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); + // select some text pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT | KEY_SHIFT); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT); @@ -2344,7 +2237,6 @@ void SdTiledRenderingTest::testCutSelectionChange() // Selection is removed CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(0), m_aSelection.size()); - comphelper::LibreOfficeKit::setActive(false); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits