orca r4046 - in trunk: . test/harness test/keystrokes/oowriter



Author: wwalker
Date: Fri Jul 18 17:23:07 2008
New Revision: 4046
URL: http://svn.gnome.org/viewvc/orca?rev=4046&view=rev

Log:
Work on OOo Writer tests.


Modified:
   trunk/ChangeLog
   trunk/test/harness/utils.py
   trunk/test/keystrokes/oowriter/bug_342602.py
   trunk/test/keystrokes/oowriter/bug_350219.py
   trunk/test/keystrokes/oowriter/bug_353268.py
   trunk/test/keystrokes/oowriter/bug_355733.py
   trunk/test/keystrokes/oowriter/bug_361624.py
   trunk/test/keystrokes/oowriter/bug_361747.py
   trunk/test/keystrokes/oowriter/bug_362979.py
   trunk/test/keystrokes/oowriter/bug_364765.py
   trunk/test/keystrokes/oowriter/bug_382408.py
   trunk/test/keystrokes/oowriter/bug_382415.py
   trunk/test/keystrokes/oowriter/bug_382418.py
   trunk/test/keystrokes/oowriter/bug_382880.py
   trunk/test/keystrokes/oowriter/bug_382888.py
   trunk/test/keystrokes/oowriter/bug_384893.py
   trunk/test/keystrokes/oowriter/bug_385828.py
   trunk/test/keystrokes/oowriter/bug_413909.py
   trunk/test/keystrokes/oowriter/bug_430402.py
   trunk/test/keystrokes/oowriter/bug_435201.py
   trunk/test/keystrokes/oowriter/bug_435226.py
   trunk/test/keystrokes/oowriter/bug_450210.py
   trunk/test/keystrokes/oowriter/bug_469367.py

Modified: trunk/test/harness/utils.py
==============================================================================
--- trunk/test/harness/utils.py	(original)
+++ trunk/test/harness/utils.py	Fri Jul 18 17:23:07 2008
@@ -21,6 +21,32 @@
 htmlDir = os.path.abspath(fullPath + "/../../html")
 htmlURLPrefix = "file://" + htmlDir + "/"
 
+# Various OpenOffice names as a regex.  These are needed because OOo likes
+# to do various things with its window titles from release to release. 
+# These regex's attempt to provide a way to manage those differences.
+#
+OOoWriterNames = "(StarOffice Writer|OpenOffice.org Writer|OOo-dev Writer Beta)"
+
+#OOO_VERSION="OOo2.4"
+#OOO_VERSION="OOo-dev 3.0 Beta"
+OOO_VERSION="StarOffice 8"
+
+def getOOoName(app):
+    if OOO_VERSION == "OOo2.4":
+        return "OpenOffice.org %s" % app
+    elif OOO_VERSION == "OOo-dev 3.0 Beta":
+        return "OOo-dev %s Beta" % app
+    elif OOO_VERSION == "StarOffice 8":
+        return "StarOffice %s" % app
+        
+def getOOoBrailleLine(app, title, remainder):
+    if OOO_VERSION == "OOo2.4":
+        return "soffice Application " + title + " - OpenOffice.org " + app + " Frame " +  title + " - OpenOffice.org " + app + " RootPane ScrollPane Document view " + remainder
+    elif OOO_VERSION == "OOo-dev 3.0 Beta":
+        return "soffice Application " + title + " - OOo-dev " + app + " Beta Frame " +  title + " - OOo-dev " + app + " Beta RootPane ScrollPane Document view " + remainder
+    elif OOO_VERSION == "StarOffice 8":
+        return "soffice Application " + title + " - StarOffice " + app + " Frame " +  title + " - StarOffice " + app + " RootPane ScrollPane Document view " + remainder
+
 createDiffs = True
 try:
     # If the difflib module is not found, fall back to generating the
@@ -91,8 +117,8 @@
             if expectedResultRE.match(results[i]):
                 continue
             else:
+                print "NO MATCH", results[i], expectedList[i]
                 return results
-
     return None
 
 class AssertPresentationAction(AtomicAction):
@@ -146,8 +172,14 @@
                 expectedToFail = True
 
         d = difflib.Differ()
-        diffs = list(d.compare(self._expectedResults, results))
-        print >> myErr, '\n'.join(list(diffs))
+        try:
+            # This can stack trace for some odd reason (UTF-8 characters?),
+            # so we need to capture it.  Otherwise, it can hang the tests.
+            #
+            diffs = list(d.compare(self._expectedResults, results))
+            print >> myErr, '\n'.join(list(diffs))
+        except:
+            print "(ERROR COMPUTING DIFFERENCES!!!)"
         return expectedToFail
 
     def printResults(self, results):

Modified: trunk/test/keystrokes/oowriter/bug_342602.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_342602.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_342602.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -26,7 +26,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -49,7 +49,7 @@
 # 4. Enter Return (Insert a table with the default parameters - 2x2).
 #
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -61,16 +61,17 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Move to cell B1",
-    ["BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table A Paragraph'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Table1-1 Table A Paragraph'",
      "     VISIBLE:  'A Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table Paragraph'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Table1-1 Table Paragraph'",     
      "     VISIBLE:  'Paragraph', cursor=1",
      "SPEECH OUTPUT: 'A'",
      "SPEECH OUTPUT: ' not selected'",
-     "SPEECH OUTPUT: 'Cell B1'",
-     "SPEECH OUTPUT: 'blank'",
+     "SPEECH OUTPUT: 'table with 2 rows and 2 columns.'",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: ' not selected'"]))
+     "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'Cell B1'",
+     "SPEECH OUTPUT: 'blank'"]))
 
 ######################################################################
 # 6. Enter Shift-Tab (Returns to cell A1).
@@ -80,15 +81,16 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Move back to cell A1",
-    ["BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table Paragraph'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Table1-1 Table Paragraph'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table A Paragraph'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Table1-1 Table A Paragraph'",
      "     VISIBLE:  'A Paragraph', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
-     "SPEECH OUTPUT: 'Cell A1'",
+     "SPEECH OUTPUT: 'table with 2 rows and 2 columns.'",
      "SPEECH OUTPUT: 'A'",
-     "SPEECH OUTPUT: ' not selected'"]))
+     "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'Cell A1'"]))
 
 ######################################################################
 # 7. Enter Alt-f, Alt-c to close the Writer application.
@@ -114,7 +116,7 @@
 ######################################################################
 # 9. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 

Modified: trunk/test/keystrokes/oowriter/bug_350219.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_350219.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_350219.py	Fri Jul 18 17:23:07 2008
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -26,15 +26,15 @@
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "New text document",
-    ["BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame'",
-     "     VISIBLE:  'Untitled2 - OpenOffice.org Write', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane Panel'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame'",
+     "     VISIBLE:  'Untitled[ ]*2 - *",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane Panel'",
      "     VISIBLE:  'Panel', cursor=1",
-     "SPEECH OUTPUT: 'Untitled2 - OpenOffice.org Writer frame'",
+     "SPEECH OUTPUT: 'Untitled[ ]*2 - " + utils.getOOoName("Writer") + " frame'",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'panel'"]))
 
@@ -48,7 +48,7 @@
 ######################################################################
 # 4. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 

Modified: trunk/test/keystrokes/oowriter/bug_353268.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_353268.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_353268.py	Fri Jul 18 17:23:07 2008
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -47,9 +47,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Return to top of document",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Line 1 $l'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 1'"]))
 
@@ -61,9 +59,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Arrow down over first line of text",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Line 2 $l'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 2 \$l'",
      "     VISIBLE:  'Line 2 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 2'"]))
 
@@ -75,9 +71,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Arrow down over second line of text",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view  $l'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view  \$l'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'blank'"]))
 

Modified: trunk/test/keystrokes/oowriter/bug_355733.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_355733.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_355733.py	Fri Jul 18 17:23:07 2008
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -25,7 +25,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -56,9 +56,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Return to top of document",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Line 1 $l'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 1'"]))
 

Modified: trunk/test/keystrokes/oowriter/bug_361624.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_361624.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_361624.py	Fri Jul 18 17:23:07 2008
@@ -14,7 +14,7 @@
 # 1. Start oowriter. There is a bug_361624.params file that will
 #    automatically load column-example.odt.
 #
-sequence.append(WaitForWindowActivate("column-example - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("column-example " + utils.getOOoName("Writer"),None))
 
 ######################################################################
 # 2. Type Control-Home to position the text caret to the left of the

Modified: trunk/test/keystrokes/oowriter/bug_361747.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_361747.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_361747.py	Fri Jul 18 17:23:07 2008
@@ -14,7 +14,7 @@
 #    automatically load empty_document.odt. This uses the FreeSerif 
 #    font as the default which should be available on all test systems.
 #
-sequence.append(WaitForWindowActivate("empty_document - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("empty_document(.odt|) - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -44,7 +44,7 @@
 sequence.append(KeyComboAction("<Control>Home"))
 sequence.append(utils.AssertPresentationAction(
     "Control-Home to move to start of document",
-    ["BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view Bold Italic Normal $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document", "Bold Italic Normal \$l") + "'",
      "     VISIBLE:  'Bold Italic Normal $l', cursor=1",
      "SPEECH OUTPUT: 'Bold Italic Normal'"]))
 
@@ -58,7 +58,7 @@
 sequence.append(utils.AssertPresentationAction(
     "Text information for bold word",
     ["SPEECH OUTPUT: 'size 12'",
-     "SPEECH OUTPUT: 'family-name FreeSerif'",
+     "SPEECH OUTPUT: 'family name FreeSerif'",
      "SPEECH OUTPUT: 'bold'"]))
 
 ######################################################################
@@ -72,11 +72,11 @@
 sequence.append(KeyReleaseAction(150, 106,"Insert"))   # Release Insert
 sequence.append(utils.AssertPresentationAction(
     "Text information for italic word",
-    ["BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view Bold Italic Normal $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document", "Bold Italic Normal \$l") + "'",
      "     VISIBLE:  'Bold Italic Normal $l', cursor=6",
      "SPEECH OUTPUT: 'Italic '",
      "SPEECH OUTPUT: 'size 12'",
-     "SPEECH OUTPUT: 'family-name FreeSerif'",
+     "SPEECH OUTPUT: 'family name FreeSerif'",
      "SPEECH OUTPUT: 'style italic'"]))
 
 ######################################################################
@@ -90,11 +90,11 @@
 sequence.append(KeyReleaseAction(150, 106,"Insert"))   # Release Insert
 sequence.append(utils.AssertPresentationAction(
     "Text information for regular word",
-    ["BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view Bold Italic Normal $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document", "Bold Italic Normal \$l") + "'",
      "     VISIBLE:  'Bold Italic Normal $l', cursor=13",
      "SPEECH OUTPUT: 'Normal'",
      "SPEECH OUTPUT: 'size 12'",
-     "SPEECH OUTPUT: 'family-name FreeSerif'"]))
+     "SPEECH OUTPUT: 'family name FreeSerif'"]))
 
 ######################################################################
 # 9. Enter Alt-f, Alt-c to close the Writer application.

Modified: trunk/test/keystrokes/oowriter/bug_362979.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_362979.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_362979.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -79,7 +79,7 @@
     "Move cursor to start of document",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view âLine 1 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view âLine 1 \$l'",
      "     VISIBLE:  'âLine 1 $l', cursor=2",
      "SPEECH OUTPUT: 'âLine 1'"]))
 
@@ -93,7 +93,7 @@
     "Move to second bulleted line",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view âLine 2 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view âLine 2 \$l'",
      "     VISIBLE:  'âLine 2 $l', cursor=2",
      "SPEECH OUTPUT: 'âLine 2'"]))
 
@@ -118,7 +118,7 @@
 ######################################################################
 # 12. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 

Modified: trunk/test/keystrokes/oowriter/bug_364765.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_364765.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_364765.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -30,9 +30,9 @@
 sequence.append(WaitForFocus("Letter...", acc_role=pyatspi.ROLE_MENU_ITEM))
 sequence.append(utils.AssertPresentationAction(
     "Press W to open the Wizards submenu",
-    ["BRAILLE LINE:  'soffice Application Untitled1 - OpenOffice.org Writer Frame Untitled1 - OpenOffice.org Writer RootPane MenuBar Wizards Menu'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*1 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*1 - " + utils.getOOoName("Writer") + " RootPane MenuBar Wizards Menu'",
      "     VISIBLE:  'Wizards Menu', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled1 - OpenOffice.org Writer Frame Untitled1 - OpenOffice.org Writer RootPane MenuBar File Menu Letter...'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*1 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*1 - " + utils.getOOoName("Writer") + " RootPane MenuBar File Menu Letter...'",
      "     VISIBLE:  'Letter...', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Wizards menu'",
@@ -47,7 +47,7 @@
 sequence.append(WaitForFocus("Wizards", acc_role=pyatspi.ROLE_MENU))
 sequence.append(utils.AssertPresentationAction(
     "Press Escape to close the Wizards submenu",
-    ["BRAILLE LINE:  'soffice Application Untitled1 - OpenOffice.org Writer Frame Untitled1 - OpenOffice.org Writer RootPane MenuBar Wizards Menu'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*1 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*1 - " + utils.getOOoName("Writer") + " RootPane MenuBar Wizards Menu'",
      "     VISIBLE:  'Wizards Menu', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Wizards menu'"]))

Modified: trunk/test/keystrokes/oowriter/bug_382408.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382408.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382408.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_382408.params file that will
 #    automatically load table-sample.odt
 #
-sequence.append(WaitForWindowActivate("table-sample - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.getOOoName("Writer"),None))
 
 ######################################################################
 # 2. Type Control-Home to move the text caret to the start of the document.
@@ -35,9 +35,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the next line",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view This is a test. $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
@@ -49,9 +47,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the Mon table column header",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Sun Mon Tue Wed Thu Fri Sat'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Sun Mon Tue Wed Thu Fri Sat") + "'",
      "     VISIBLE:  'Mon Tue Wed Thu Fri Sat', cursor=1",
      "SPEECH OUTPUT: 'Sun Mon Tue Wed Thu Fri Sat'",
      "SPEECH OUTPUT: ' not selected'"]))

Modified: trunk/test/keystrokes/oowriter/bug_382415.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382415.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382415.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_382415.params file that will
 #    automatically load table-sample.odt
 #
-sequence.append(WaitForWindowActivate("table-sample - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.getOOoName("Writer"),None))
 
 ######################################################################
 # 2. Type Control-Home to move the text caret to the start of the document.
@@ -28,9 +28,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Down arrow to next line",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view This is a test. $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
@@ -42,9 +40,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Down arrow to move to the Mon table column header",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Cell B1'",
      "SPEECH OUTPUT: 'Mon'",
@@ -58,9 +54,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Down arrow to move to the blank table cell on the next row",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Mon'",
      "SPEECH OUTPUT: ' not selected'",
@@ -76,9 +72,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Down arrow to move to the '4' table cell on the next row",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -94,9 +90,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Down arrow to move to the '11' table cell on the next row",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
      "SPEECH OUTPUT: '4'",
      "SPEECH OUTPUT: ' not selected'",

Modified: trunk/test/keystrokes/oowriter/bug_382418.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382418.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382418.py	Fri Jul 18 17:23:07 2008
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -25,7 +25,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -63,11 +63,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type Control-Home to move to start of document",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table Paragraph'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Table1-1 Table Paragraph'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Line 1 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -82,9 +80,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to enter the table",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "SPEECH OUTPUT: 'table with 2 rows and 2 columns.'",
+    ["SPEECH OUTPUT: 'table with 2 rows and 2 columns.'",
      "SPEECH OUTPUT: 'Cell A1'"]))
 
 ######################################################################
@@ -108,7 +104,7 @@
 ######################################################################
 # 10. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 

Modified: trunk/test/keystrokes/oowriter/bug_382880.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382880.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382880.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_382880.params file that will
 #    automatically load table-sample.odt
 #
-sequence.append(WaitForWindowActivate("table-sample - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.getOOoName("Writer"),None))
 
 ######################################################################
 # 2. Type Control-Home to move the text caret to the start of the document.
@@ -28,9 +28,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the next line",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view This is a test. $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
@@ -42,9 +40,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the Mon table column header",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Cell B1'",
      "SPEECH OUTPUT: 'Mon'",
@@ -58,15 +54,16 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a Tab to move to the Tue table column header",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Tue Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Tue Paragraph") + "'",
      "     VISIBLE:  'Tue Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Mon'",
      "SPEECH OUTPUT: ' not selected'",
-     "SPEECH OUTPUT: 'Cell C1'",
+     "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
      "SPEECH OUTPUT: 'Tue'",
-     "SPEECH OUTPUT: ' not selected'"]))
+     "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'Cell C1'"]))
 
 ######################################################################
 # 6. Type a down arrow to move to the blank cell C2.
@@ -76,9 +73,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the blank cell C2",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Tue Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Tue Paragraph") + "'",
      "     VISIBLE:  'Tue Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Tue'",
      "SPEECH OUTPUT: ' not selected'",
@@ -94,9 +91,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to cell C3 containing '5'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 5 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 5 Paragraph") + "'",
      "     VISIBLE:  '5 Paragraph', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -112,15 +109,16 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a Shift-Tab to move to cell B3 containing '4'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 5 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 5 Paragraph") + "'",
      "     VISIBLE:  '5 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: '5'",
      "SPEECH OUTPUT: ' not selected'",
-     "SPEECH OUTPUT: 'Cell B3'",
+     "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
      "SPEECH OUTPUT: '4'",
-     "SPEECH OUTPUT: ' not selected'"]))
+     "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'Cell B3'"]))
 
 ######################################################################
 # 9. Type a down arrow to move to cell B4 containing "11".
@@ -130,9 +128,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to cell B4 containing '11'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
      "SPEECH OUTPUT: '4'",
      "SPEECH OUTPUT: ' not selected'",
@@ -148,12 +146,13 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type an up arrow to move to cell B3 containing '4'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: '11'",
      "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
      "SPEECH OUTPUT: '4'",
      "SPEECH OUTPUT: ' not selected'",
      "SPEECH OUTPUT: 'Cell B3'"]))

Modified: trunk/test/keystrokes/oowriter/bug_382888.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382888.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382888.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_382888.params file that will
 #    automatically load table-sample.odt
 #
-sequence.append(WaitForWindowActivate("table-sample - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.getOOoName("Writer"),None))
 
 ######################################################################
 # 2. Type Control-Home to move the text caret to the start of the document.
@@ -28,9 +28,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the next line",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view This is a test. $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
@@ -42,9 +40,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the Mon table column header",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Cell B1'",
      "SPEECH OUTPUT: 'Mon'",
@@ -58,15 +54,16 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a Tab to move to the Tue table column header",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Tue Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Tue Paragraph") + "'",
      "     VISIBLE:  'Tue Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Mon'",
      "SPEECH OUTPUT: ' not selected'",
-     "SPEECH OUTPUT: 'Cell C1'",
+     "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
      "SPEECH OUTPUT: 'Tue'",
-     "SPEECH OUTPUT: ' not selected'"]))
+     "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'Cell C1'"]))
 
 ######################################################################
 # 6. Type a down arrow to move to the blank cell C2.
@@ -76,9 +73,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the blank cell C2",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Tue Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Tue Paragraph") + "'",
      "     VISIBLE:  'Tue Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Tue'",
      "SPEECH OUTPUT: ' not selected'",
@@ -94,9 +91,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to cell C3 containing '5'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 5 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 5 Paragraph") + "'",
      "     VISIBLE:  '5 Paragraph', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -112,15 +109,16 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a Shift-Tab to move to cell B3 containing '4'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 5 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 5 Paragraph") + "'",
      "     VISIBLE:  '5 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: '5'",
      "SPEECH OUTPUT: ' not selected'",
-     "SPEECH OUTPUT: 'Cell B3'",
+     "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
      "SPEECH OUTPUT: '4'",
-     "SPEECH OUTPUT: ' not selected'"]))
+     "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'Cell B3'"]))
 
 ######################################################################
 # 9. Type a down arrow to move to cell B4 containing "11".
@@ -130,9 +128,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to cell B4 containing '11'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
      "SPEECH OUTPUT: '4'",
      "SPEECH OUTPUT: ' not selected'",
@@ -148,12 +146,13 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type an up arrow to move to cell B3 containing '4'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: '11'",
      "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
      "SPEECH OUTPUT: '4'",
      "SPEECH OUTPUT: ' not selected'",
      "SPEECH OUTPUT: 'Cell B3'"]))

Modified: trunk/test/keystrokes/oowriter/bug_384893.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_384893.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_384893.py	Fri Jul 18 17:23:07 2008
@@ -15,7 +15,7 @@
 #    automatically load empty_document.odt. This uses the FreeSerif
 #    font as the default which should be available on all test systems.
 #
-sequence.append(WaitForWindowActivate("empty_document - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("empty_document(.odt|) - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -47,7 +47,7 @@
 sequence.append(KeyComboAction("<Control>Home"))
 sequence.append(utils.AssertPresentationAction(
     "Type Control-Home to move to start of document",
-    ["BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view This is a test $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document", "This is a test \$l") + "'",
      "     VISIBLE:  'This is a test $l', cursor=1",
      "SPEECH OUTPUT: 'This is a test'"]))
 
@@ -61,7 +61,7 @@
 sequence.append(utils.AssertPresentationAction(
     "Enter Insert-f to get text information on the underlined word",
     ["SPEECH OUTPUT: 'size 12'",
-     "SPEECH OUTPUT: 'family-name FreeSerif'",
+     "SPEECH OUTPUT: 'family name FreeSerif'",
      "SPEECH OUTPUT: 'underline single'"]))
 
 ######################################################################
@@ -82,7 +82,7 @@
 sequence.append(utils.AssertPresentationAction(
     "Enter Insert-f to get text information on the bold word",
     ["SPEECH OUTPUT: 'size 12'",
-     "SPEECH OUTPUT: 'family-name FreeSerif'",
+     "SPEECH OUTPUT: 'family name FreeSerif'",
      "SPEECH OUTPUT: 'bold'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_385828.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_385828.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_385828.py	Fri Jul 18 17:23:07 2008
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -32,18 +32,18 @@
 #
 sequence.append(utils.StartRecordingAction())
 sequence.append(TypeAction("a"))
-sequence.append(WaitForWindowActivate("aw-5blue (read-only) - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("aw-5blue (read-only) - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("Page design", acc_role=pyatspi.ROLE_LABEL))
 sequence.append(utils.AssertPresentationAction(
     "Press 'a' to bring up the Agenda... wizard",
-    ["BRAILLE LINE:  'soffice Application aw-5blue (read-only) - OpenOffice.org Writer Frame'",
-     "     VISIBLE:  'aw-5blue (read-only) - OpenOffic', cursor=1",
+    ["BRAILLE LINE:  'soffice Application aw-5blue (read-only) - " + utils.getOOoName("Writer") + " Frame (1 dialog)'",
+     "     VISIBLE:  'aw-5blue \(read-only\) - " + utils.getOOoName("Writer")[0:9] + "', cursor=1",
      "BRAILLE LINE:  'soffice Application Agenda Wizard Dialog'",
      "     VISIBLE:  'Agenda Wizard Dialog', cursor=1",
-     "BRAILLE LINE:  'soffice Application Agenda Wizard Dialog Steps Panel  $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "SPEECH OUTPUT: 'aw-5blue (read-only) - OpenOffice.org Writer frame'",
-     "SPEECH OUTPUT: 'Agenda Wizard'",
+     "BRAILLE LINE:  'soffice Application Agenda Wizard Dialog Agenda Wizard OptionPane Steps Panel  $l'",
+     "     VISIBLE:  '  $l', cursor=1",
+     "SPEECH OUTPUT: 'aw-5blue (read-only) - " + utils.getOOoName("Writer") + " frame 1 unfocused dialog'",
+     "SPEECH OUTPUT: 'Agenda Wizard Please choose the page design for the agenda 1. Page design 2. General information 3. Headings to include 4. Names 5. Agenda items 6. Name and location'",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Page design label'"]))
 

Modified: trunk/test/keystrokes/oowriter/bug_413909.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_413909.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_413909.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -26,7 +26,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -51,9 +51,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type Control-Home to move to the start of the document",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=1",
      "SPEECH OUTPUT: 'The quuuiick brown fox'"]))
 
@@ -65,41 +63,40 @@
 sequence.append(WaitForFocus("Change", acc_role=pyatspi.ROLE_PUSH_BUTTON))
 sequence.append(utils.AssertPresentationAction(
     "Enter F7 to bring up the spell checking dialog",
-    ["BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=2",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=3",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=4",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=5",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=23",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=14",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=15",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=16",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=17",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=18",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=19",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=20",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=21",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=22",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=23",
      "BRAILLE LINE:  'soffice Application Spellcheck:  (English (USA)) Dialog'",
      "     VISIBLE:  'Spellcheck:  (English (USA)) Dia', cursor=1",
      "BRAILLE LINE:  'soffice Application Spellcheck:  (English (USA)) Dialog Spellcheck:  (English (USA)) OptionPane Change Button'",
      "     VISIBLE:  'Change Button', cursor=1",
-     "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Spellcheck:  (English (USA))'",
      "SPEECH OUTPUT: 'Misspelled word: quuuiick Context is The quuuiick brown fox'",
      "SPEECH OUTPUT: ''",
@@ -130,7 +127,7 @@
 ######################################################################
 # 9. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 

Modified: trunk/test/keystrokes/oowriter/bug_430402.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_430402.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_430402.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -26,7 +26,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -61,9 +61,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type Control-Home to move to start of document",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quick $l'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view The quick \$l'",
      "     VISIBLE:  'The quick $l', cursor=1",
      "SPEECH OUTPUT: 'The quick'"]))
 
@@ -98,7 +96,7 @@
 ######################################################################
 # 8. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 

Modified: trunk/test/keystrokes/oowriter/bug_435201.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_435201.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_435201.py	Fri Jul 18 17:23:07 2008
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_435201.params file that will
 # automatically load spanish.odt
 #
-sequence.append(WaitForWindowActivate("spanish - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("spanish - " + utils.getOOoName("Writer"),None))
 
 ######################################################################
 # 2. Type Control-Home to position the text caret to the left of the
@@ -31,13 +31,13 @@
 sequence.append(utils.AssertPresentationAction(
     "Type Control-down to move to the next paragraph [1]",
     ["BUG: speaks the paragraph three times",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and  \$l") + "'",
      "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=2",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and  \$l") + "'",
      "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
      "BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and  $l'",
      "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse  \$l") + "'",
      "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
      "SPEECH OUTPUT: 'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and '",
      "SPEECH OUTPUT: 'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and '",
@@ -52,13 +52,13 @@
 sequence.append(utils.AssertPresentationAction(
     "Type Control-down to move to the next paragraph [2]",
     ["BUG: speaks the paragraph two times",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse  \$l") + "'",
      "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=2",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse  \$l") + "'",
      "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
      "BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse  $l'",
      "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", " \$l") + "'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse '",
      "SPEECH OUTPUT: 'NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse '",
@@ -73,17 +73,15 @@
 sequence.append(utils.AssertPresentationAction(
     "Type Control-down to move to the next paragraph [3]",
     ["BUG: speaks the paragraph two times",
-     "BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Now old lady, you have one last chance.  Confess the heinous sin of heresy, reject  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Now old lady, you have one last chance.  Confess the heinous sin of heresy, reject  \$l") + "'",
      "     VISIBLE:  'Now old lady, you have one last ', cursor=1",
      "BRAILLE LINE:  'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject  $l'",
      "     VISIBLE:  'Now old lady, you have one last ', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", " \$l") + "'",
      "     VISIBLE:  ' $l', cursor=1",
      "BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Now old lady, you have one last chance.  Confess the heinous sin of heresy, reject  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Now old lady, you have one last chance.  Confess the heinous sin of heresy, reject  \$l") + "'",
      "     VISIBLE:  'Now old lady, you have one last ', cursor=1",
      "SPEECH OUTPUT: 'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject '",
      "SPEECH OUTPUT: 'blank'",
@@ -98,13 +96,13 @@
 sequence.append(utils.AssertPresentationAction(
     "Type Control-down to move to the next paragraph [4]",
     ["BUG: speaks the paragraph two times",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Now old lady, you have one last chance.  Confess the heinous sin of heresy, reject  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Now old lady, you have one last chance.  Confess the heinous sin of heresy, reject  \$l") + "'",
      "     VISIBLE:  'Now old lady, you have one last ', cursor=2",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Now old lady, you have one last chance.  Confess the heinous sin of heresy, reject  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Now old lady, you have one last chance.  Confess the heinous sin of heresy, reject  \$l") + "'",
      "     VISIBLE:  'Now old lady, you have one last ', cursor=1",
      "BRAILLE LINE:  'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject  $l'",
      "     VISIBLE:  'Now old lady, you have one last ', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", " \$l") + "'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject '",
      "SPEECH OUTPUT: 'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject '",
@@ -119,17 +117,15 @@
 sequence.append(utils.AssertPresentationAction(
     "Type Control-down to move to the next paragraph [5]",
     ["BUG: speaks the paragraph two times",
-     "BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! \$l") + "'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=1",
      "BRAILLE LINE:  'Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view  $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", " \$l") + "'",
      "     VISIBLE:  ' $l', cursor=1",
      "BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! \$l") + "'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=1",
      "SPEECH OUTPUT: 'Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR!'",
      "SPEECH OUTPUT: 'blank'",

Modified: trunk/test/keystrokes/oowriter/bug_435226.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_435226.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_435226.py	Fri Jul 18 17:23:07 2008
@@ -18,7 +18,7 @@
 # 1. Start oowriter. There is a bug_435226.params file that will
 #    automatically load spanish.odt.
 #
-sequence.append(WaitForWindowActivate("spanish - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("spanish(.odt|) - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -72,7 +72,7 @@
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
     "Type KP-Enter once to do a 'single-click' where-am-I operation",
-    ["BRAILLE LINE:  'soffice Application spanish - OpenOffice.org Writer Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! \$l") + "'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=17",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'paragraph'",
@@ -89,9 +89,9 @@
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
     "Type KP-Enter twice to do a 'double-click' where-am-I operation",
-    ["BRAILLE LINE:  'soffice Application spanish - OpenOffice.org Writer Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! \$l") + "'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=17",
-     "BRAILLE LINE:  'soffice Application spanish - OpenOffice.org Writer Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "spanish", "Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! \$l") + "'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=17",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'paragraph'",

Modified: trunk/test/keystrokes/oowriter/bug_450210.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_450210.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_450210.py	Fri Jul 18 17:23:07 2008
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.getOOoName("Writer"),None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -29,13 +29,13 @@
 sequence.append(WaitAction("focus:",
                            None,
                            None,
-                           pyatspi.ROLE_TABLE,
+                           pyatspi.ROLE_LIST,
                            30000))
 sequence.append(utils.AssertPresentationAction(
     "Press 'o' to open the Open File Chooser",
     ["BRAILLE LINE:  'soffice Application Open Dialog'",
      "     VISIBLE:  'soffice Application Open Dialog', cursor=21",
-     "BRAILLE LINE:  'soffice Application Open Dialog File name: File name: List'",
+     "BRAILLE LINE:  'soffice Application Open Dialog Open OptionPane File name: File name: List'",
      "     VISIBLE:  'File name: File name: List', cursor=1",
      "SPEECH OUTPUT: 'Open'",
      "SPEECH OUTPUT: 'File name: combo box'",

Modified: trunk/test/keystrokes/oowriter/bug_469367.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_469367.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_469367.py	Fri Jul 18 17:23:07 2008
@@ -15,7 +15,7 @@
 #    automatically load empty_document.odt. This uses the FreeSerif
 #    font as the default which should be available on all test systems.
 #
-sequence.append(WaitForWindowActivate("empty_document - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("empty_document(.odt|) - " + utils.getOOoName("Writer"), None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -41,9 +41,7 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Enter up arrow to position the text caret on the first line",
-    ["BRAILLE LINE:  ' $l'",
-     "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view 		   This is a test. $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document", "		   This is a test. \$l") + "'",
      "     VISIBLE:  '		   This is a test. $l', cursor=1",
      "SPEECH OUTPUT: '		   This is a test.'"]))
 
@@ -57,7 +55,7 @@
 sequence.append(utils.AssertPresentationAction(
     "Enter Insert-f to get text information",
     ["SPEECH OUTPUT: 'size 12'",
-     "SPEECH OUTPUT: 'family-name FreeSerif'"]))
+     "SPEECH OUTPUT: 'family name FreeSerif'"]))
 
 ######################################################################
 # 6. Enter Alt-f, Alt-c to close the Writer application.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]