diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-09-07 16:25:45 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-16 17:38:04 +0200 |
commit | 245c76630f86695234840601e76067388b740de2 (patch) | |
tree | 45483f4e902a838abb9ba3e2c20cfd329b049e0d /desktop | |
parent | 97841488696a58a930f334b495a57c244d63c0f7 (diff) |
jsdialog: enable Hyperlink Dialog
- removed old "tunneled window" test for hyperlink dialog
which cannot work when using jsdialogs
Change-Id: I62b6c568149d4ea4656b23c47f4c79efe61abfb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156668
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Attila Szűcs <attila.szucs@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157022
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 186a18b0a03b..dcb5c7192782 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -211,8 +211,6 @@ public: void testComplexSelection(); void testSpellcheckerMultiView(); void testDialogPaste(); - void testShowHideDialog(); - void testDialogInput(); void testCalcSaveAs(); void testControlState(); void testMetricField(); @@ -285,8 +283,6 @@ public: CPPUNIT_TEST(testComplexSelection); CPPUNIT_TEST(testSpellcheckerMultiView); CPPUNIT_TEST(testDialogPaste); - CPPUNIT_TEST(testShowHideDialog); - CPPUNIT_TEST(testDialogInput); CPPUNIT_TEST(testCalcSaveAs); CPPUNIT_TEST(testControlState); CPPUNIT_TEST(testMetricField); @@ -2040,34 +2036,6 @@ void DesktopLOKTest::testBinaryCallback() } } -void DesktopLOKTest::testDialogInput() -{ - LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); - pDocument->pClass->postUnoCommand(pDocument, ".uno:HyperlinkDialog", nullptr, false); - Scheduler::ProcessEventsToIdle(); - - SfxViewShell* pViewShell = SfxViewShell::Current(); - pViewShell->GetViewFrame().GetBindings().Update(); - - VclPtr<vcl::Window> pWindow(Application::GetActiveTopWindow()); - CPPUNIT_ASSERT(pWindow); - - Control* pCtrlFocused = GetFocusControl(pWindow.get()); - CPPUNIT_ASSERT(pCtrlFocused); - CPPUNIT_ASSERT_EQUAL(WindowType::COMBOBOX, pCtrlFocused->GetType()); - CPPUNIT_ASSERT_EQUAL(OUString(""), pCtrlFocused->GetText()); - - vcl::LOKWindowId nDialogId = pWindow->GetLOKWindowId(); - pDocument->pClass->postWindowExtTextInputEvent(pDocument, nDialogId, LOK_EXT_TEXTINPUT, "wiki."); - pDocument->pClass->postWindowExtTextInputEvent(pDocument, nDialogId, LOK_EXT_TEXTINPUT_END, "wiki."); - pDocument->pClass->removeTextContext(pDocument, nDialogId, 1, 0); - Scheduler::ProcessEventsToIdle(); - CPPUNIT_ASSERT_EQUAL(OUString("wiki"), pCtrlFocused->GetText()); - - static_cast<SystemWindow*>(pWindow.get())->Close(); - Scheduler::ProcessEventsToIdle(); -} - void DesktopLOKTest::testInput() { // Load a Writer document, enable change recording and press a key. @@ -2174,7 +2142,6 @@ public: boost::property_tree::ptree m_aCommentCallbackResult; boost::property_tree::ptree m_aCallbackWindowResult; boost::property_tree::ptree m_aColorPaletteCallbackResult; - bool m_bWindowHidden; ViewCallback(LibLODocument_Impl* pDocument) : mpDocument(pDocument), @@ -2231,16 +2198,6 @@ public: m_aCommentCallbackResult = m_aCommentCallbackResult.get_child("comment"); } break; - case LOK_CALLBACK_WINDOW: - { - m_aCallbackWindowResult.clear(); - std::stringstream aStream(pPayload); - boost::property_tree::read_json(aStream, m_aCallbackWindowResult); - - std::string sAction = m_aCallbackWindowResult.get<std::string>("action"); - if (sAction == "hide") - m_bWindowHidden = true; - } break; case LOK_CALLBACK_CELL_FORMULA: { @@ -3083,31 +3040,6 @@ void DesktopLOKTest::testDialogPaste() Scheduler::ProcessEventsToIdle(); } -void DesktopLOKTest::testShowHideDialog() -{ - - LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); - - pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}"); - ViewCallback aView(pDocument); - - pDocument->pClass->postUnoCommand(pDocument, ".uno:HyperlinkDialog", nullptr, false); - Scheduler::ProcessEventsToIdle(); - - VclPtr<vcl::Window> pWindow(Application::GetActiveTopWindow()); - CPPUNIT_ASSERT(pWindow); - - aView.m_bWindowHidden = false; - - pWindow->Hide(); - Scheduler::ProcessEventsToIdle(); - - CPPUNIT_ASSERT_EQUAL(true, aView.m_bWindowHidden); - - static_cast<SystemWindow*>(pWindow.get())->Close(); - Scheduler::ProcessEventsToIdle(); -} - void DesktopLOKTest::testComplexSelection() { // Start with a blank text file and add contents. |