summaryrefslogtreecommitdiff
path: root/sfx2/qa
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-01-05 15:06:34 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-01-05 15:06:34 +0100
commiteae2f3dc45f4f80f852aeef23047d261b361af73 (patch)
tree5ba2e331fa5a34c0694aaddebff5c606a90ccdba /sfx2/qa
parent66958fe5677325915960f4c7991e57564b7ec743 (diff)
undoapi: now that the Writer supports the XUndoManager, too, we can remove the temporary fake test
Diffstat (limited to 'sfx2/qa')
-rwxr-xr-xsfx2/qa/complex/sfx2/UndoManager.java29
1 files changed, 6 insertions, 23 deletions
diff --git a/sfx2/qa/complex/sfx2/UndoManager.java b/sfx2/qa/complex/sfx2/UndoManager.java
index cc2c4a98d608..ab1b9de910b8 100755
--- a/sfx2/qa/complex/sfx2/UndoManager.java
+++ b/sfx2/qa/complex/sfx2/UndoManager.java
@@ -123,7 +123,7 @@ public class UndoManager
public void checkWriterUndo() throws Exception
{
m_currentTestCase = new WriterDocumentTest( getORB() );
- impl_checkUndo( false );
+ impl_checkUndo();
}
// -----------------------------------------------------------------------------------------------------------------
@@ -131,7 +131,7 @@ public class UndoManager
public void checkCalcUndo() throws Exception
{
m_currentTestCase = new CalcDocumentTest( getORB() );
- impl_checkUndo( false );
+ impl_checkUndo();
}
// -----------------------------------------------------------------------------------------------------------------
@@ -139,7 +139,7 @@ public class UndoManager
public void checkDrawUndo() throws Exception
{
m_currentTestCase = new DrawDocumentTest( getORB() );
- impl_checkUndo( false );
+ impl_checkUndo();
}
// -----------------------------------------------------------------------------------------------------------------
@@ -147,7 +147,7 @@ public class UndoManager
public void checkImpressUndo() throws Exception
{
m_currentTestCase = new ImpressDocumentTest( getORB() );
- impl_checkUndo( false );
+ impl_checkUndo();
}
// -----------------------------------------------------------------------------------------------------------------
@@ -155,7 +155,7 @@ public class UndoManager
public void checkChartUndo() throws Exception
{
m_currentTestCase = new ChartDocumentTest( getORB() );
- impl_checkUndo( false );
+ impl_checkUndo();
}
// -----------------------------------------------------------------------------------------------------------------
@@ -619,30 +619,13 @@ public class UndoManager
};
// -----------------------------------------------------------------------------------------------------------------
- private void impl_checkUndo( final boolean i_fakeTestForNow ) throws Exception
+ private void impl_checkUndo() throws Exception
{
System.out.println( "testing: " + m_currentTestCase.getDocumentDescription() );
m_currentDocument = m_currentTestCase.getDocument();
m_currentTestCase.initializeDocument();
m_currentTestCase.verifyInitialDocumentState();
- if ( i_fakeTestForNow )
- {
- // Writer does not yet have an UndoManager in the current phase of the implementation. Once it has, we
- // this complete branch, which barely tests anything (except perhaps the DocumentTest implementation),
- // can vanish.
- m_currentTestCase.doSingleModification();
- m_currentTestCase.verifySingleModificationDocumentState();
- m_currentTestCase.getDocument().getCurrentView().dispatch( ".uno:Undo" );
- m_currentTestCase.verifyInitialDocumentState();
- final int expectedUndoSteps = m_currentTestCase.doMultipleModifications();
- for ( int i=0; i<expectedUndoSteps; ++i )
- m_currentTestCase.getDocument().getCurrentView().dispatch( ".uno:Undo" );
- m_currentTestCase.verifyInitialDocumentState();
- m_currentTestCase.getDocument().close();
- return;
- }
-
final XUndoManager undoManager = getUndoManager();
undoManager.clear();
assertFalse( "clearing the Undo manager should result in the impossibility to undo anything", undoManager.isUndoPossible() );