sw/qa/extras/uiwriter/uiwriter3.cxx |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 9af57871fc153ca0145dd40e48f577564395ab73
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue May 9 11:18:49 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue May 9 17:48:18 2023 +0200

    tdf#154282: sw_uiwriter3: Add unittest
    
    Change-Id: I48b0dd636f50bf0b4d08ee0d43593f6142babd3b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151566
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index c1a8faef373a..ef6de9c8e660 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -1780,6 +1780,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134253)
     CPPUNIT_ASSERT_EQUAL(6, getPages());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testNotebookBar)
+{
+    createSwDoc();
+
+    //tdf#154282: Without the fix in place, this test would have crashed
+    dispatchCommand(mxComponent, 
".uno:ToolbarMode?Mode:string=notebookbar.ui", {});
+    dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Single", {});
+    dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Sidebar", {});
+    dispatchCommand(mxComponent, 
".uno:ToolbarMode?Mode:string=notebookbar_compact.ui", {});
+    dispatchCommand(mxComponent, 
".uno:ToolbarMode?Mode:string=notebookbar_groupedbar_compact.ui",
+                    {});
+    dispatchCommand(mxComponent, 
".uno:ToolbarMode?Mode:string=notebookbar_single.ui", {});
+    dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Default", {});
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, TestAsCharTextBox)
 {
     // Related tickets:

Reply via email to