summaryrefslogtreecommitdiff
path: root/sfx2/qa
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-01-05 14:39:23 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-01-05 14:39:23 +0100
commit66958fe5677325915960f4c7991e57564b7ec743 (patch)
tree1f56bd9932f772c2e05393a4cc8f3e5e5afacc6f /sfx2/qa
parent7f77e8a49286d0b6bfd6e118cccca9a69bfb87b0 (diff)
undoapi: fix UndoManager test for m96, by disabling a test which uses currently broken external functionality (i116313), and by correcting the broken Basic script in the test which older OOo versions silently accepted
Diffstat (limited to 'sfx2/qa')
-rwxr-xr-xsfx2/qa/complex/sfx2/UndoManager.java18
-rw-r--r--sfx2/qa/complex/sfx2/makefile.mk1
2 files changed, 11 insertions, 8 deletions
diff --git a/sfx2/qa/complex/sfx2/UndoManager.java b/sfx2/qa/complex/sfx2/UndoManager.java
index f3625747dd13..cc2c4a98d608 100755
--- a/sfx2/qa/complex/sfx2/UndoManager.java
+++ b/sfx2/qa/complex/sfx2/UndoManager.java
@@ -178,8 +178,8 @@ public class UndoManager
// set up the button
final XPropertySet buttonModel = impl_setupButton();
buttonModel.setPropertyValue( "Label", "exec broken script" );
- impl_assignStarBasicScript( buttonModel, "XActionListener", "actionPerformed",
- "document:default.callbacks.brokenScript" );
+ impl_assignScript( buttonModel, "XActionListener", "actionPerformed",
+ scriptURI );
// switch the doc's view to form alive mode (so the button will actually work)
m_currentDocument.getCurrentView().dispatch( ".uno:SwitchControlDesignMode" );
@@ -220,11 +220,13 @@ public class UndoManager
};
events.replaceByName( "OnViewCreated", scriptDescriptor );
- m_callbackCalled = false;
+ // The below doesn't work: event notification is broken in m96, see http://www.openoffice.org/issues/show_bug.cgi?id=116313
+/* m_callbackCalled = false;
m_currentDocument.getCurrentView().dispatch( ".uno:NewWindow" );
assertTrue( "triggering an event did not work as expected - basic script not called", m_callbackCalled );
// same as above: The script didn't close the context, but the OOo framework should have
assertEquals( "undo context was not auto-closed as expected", 0, m_undoListener.getCurrentUndoContextDepth() );
+ */
// .............................................................................................................
// scenario 4: let the script enter an Undo context, but not close it, as usual.
@@ -340,7 +342,7 @@ public class UndoManager
"\n" +
"Sub brokenScript\n" +
" Dim callback as Object\n" +
- " ThisComponent.UndoManager.enterUndoContext( \"" + getCallbackUndoContextTitle() + "\"\n" +
+ " ThisComponent.UndoManager.enterUndoContext( \"" + getCallbackUndoContextTitle() + "\" )\n" +
"\n" +
" callback = createUnoService( \"" + getCallbackComponentServiceName() + "\" )\n" +
" Dim emptyArgs() as new com.sun.star.beans.NamedValue\n" +
@@ -394,8 +396,8 @@ public class UndoManager
}
// -----------------------------------------------------------------------------------------------------------------
- private void impl_assignStarBasicScript( final XPropertySet i_controlModel, final String i_interfaceName,
- final String i_interfaceMethod, final String i_scriptCode )
+ private void impl_assignScript( final XPropertySet i_controlModel, final String i_interfaceName,
+ final String i_interfaceMethod, final String i_scriptURI )
{
try
{
@@ -419,8 +421,8 @@ public class UndoManager
i_interfaceName,
i_interfaceMethod,
"",
- "StarBasic",
- i_scriptCode
+ "Script",
+ i_scriptURI
) );
}
catch( com.sun.star.uno.Exception e )
diff --git a/sfx2/qa/complex/sfx2/makefile.mk b/sfx2/qa/complex/sfx2/makefile.mk
index 03c42ecc2638..20b170fba3b4 100644
--- a/sfx2/qa/complex/sfx2/makefile.mk
+++ b/sfx2/qa/complex/sfx2/makefile.mk
@@ -57,6 +57,7 @@ JAVATESTFILES = \
DocumentProperties.java \
StandaloneDocumentInfo.java \
DocumentMetadataAccess.java \
+ UndoManager.java \
# disabled: #i115674#
# GlobalEventBroadcaster.java \