summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-03-10 15:42:42 +0100
committerVladimir Glazunov <vg@openoffice.org>2010-03-10 15:42:42 +0100
commitd369c11cce9c7cd486a9f592bf27497ca630fb2c (patch)
treec00086b8dfc3693329ca7899e5e170bf0844367e
parent76f254ea8c11b8cb4f41a9a989dbadd2ad14899c (diff)
parent3110322ea5c97128d188d47939e1583932e78bbd (diff)
CWS-TOOLING: integrate CWS ab76
Notes
split repo tag: testing_ooo/DEV300_m75
-rw-r--r--testautomation/framework/optional/includes/basic_issues.inc37
-rwxr-xr-xtestautomation/global/input/macros.txt17
2 files changed, 41 insertions, 13 deletions
diff --git a/testautomation/framework/optional/includes/basic_issues.inc b/testautomation/framework/optional/includes/basic_issues.inc
index d07326226ed8..0c38e743fb93 100644
--- a/testautomation/framework/optional/includes/basic_issues.inc
+++ b/testautomation/framework/optional/includes/basic_issues.inc
@@ -52,6 +52,13 @@ function hTestActive( cString as string , iMethod as integer , bExact as boolean
' -3 = content of messagebox not relevant
' -4 = Messagebox not displayed / Macro not executed
' 1 - 4 = Number of buttons on the dialog
+
+ ' internal states, if state = 0 we return the buttoncount instead
+ const STATE_SUCCESS = 0
+ const STATE_FUZZY_MATCH = -1
+ const STATE_NO_MATCH = -2
+ const STATE_IGNORE_MSGBOX = -3
+ const STATE_MACRO_EXECUTION_FAILED = -4
const CFN = "hTestActive()::"
@@ -65,30 +72,26 @@ function hTestActive( cString as string , iMethod as integer , bExact as boolean
cMsg = Active.getText()
if ( cString <> "" ) then
- if ( instr( active.getText(), cString ) <> 0 ) then
+ if ( instr( active.getText(), cString ) ) then
if ( active.getText() = cString ) then
- 'printlog( CFN & "Correct message found (exact match): " & cMsg )
- rc = 0
+ rc = STATE_SUCCESS
else
if ( bExact ) then
warnlog( CFN & "Message is no exact match: " & cMsg )
- rc = -1
+ rc = STATE_FUZZY_MATCH
else
- 'printlog( CFN & "Correct message found (fuzzy match): " & cMsg )
- rc = 0
+ rc = STATE_SUCCESS
endif
endif
else
warnlog( CFN & "Messagebox has wrong content: " & cMsg )
- rc = -4
+ rc = STATE_NO_MATCH
endif
else
- 'printlog( CFN & "Messagebox: " & cMsg )
- rc = -3
+ rc = STATE_IGNORE_MSGBOX
endif
buttons = Active.getButtonCount()
- 'printlog( CFN & "Number of buttons: " & buttons )
select case( iMethod )
case 1 : Active.OK()
case 2 : Active.Cancel()
@@ -97,9 +100,10 @@ function hTestActive( cString as string , iMethod as integer , bExact as boolean
end select
else
warnlog( CFN & "Messagebox is missing" )
+ rc = STATE_MACRO_EXECUTION_FAILED
endif
- if ( rc = 0 ) then hTestActive() = buttons
+ if ( rc = STATE_SUCCESS ) then hTestActive() = buttons
end function
@@ -176,7 +180,7 @@ testcase t_macros()
hIDERunMacro()
hTestActive( "1900" , 1 , FALSE )
hTestActive( "2" , 1 , FALSE )
-'---------
+
printlog( "" )
printlog( " ---------- i103691 ------------ " )
hInsertMacroFromFile( "i103691" )
@@ -197,7 +201,14 @@ testcase t_macros()
hTestActive( "43" , 1 , FALSE )
hTestActive( "Pi" , 1 , FALSE )
-'-------
+ printlog( "" )
+ printlog( " ---------- i107070 ------------ " )
+ hInsertMacroFromFile( "i107070" )
+ hIDERunMacro()
+ hTestActive( "Dbg_Methods" , 1 , FALSE )
+ hTestActive( "Dbg_Methods" , 1 , FALSE )
+ hTestActive( "." , 1 , FALSE )
+
printlog( "" )
printlog( " ---------- MessageBoxes ------------ " )
hInsertMacroFromFile( "MessageBoxes" )
diff --git a/testautomation/global/input/macros.txt b/testautomation/global/input/macros.txt
index f34e54f607d1..ffe95be431e3 100755
--- a/testautomation/global/input/macros.txt
+++ b/testautomation/global/input/macros.txt
@@ -262,3 +262,20 @@ Sub Main
msgbox( "Error" )
endif
end sub
+
+# ---------------------------------------------------------------------------- #
+
+[i107070]
+Sub Main
+ oSingleton = com.sun.star.logging.LoggerPool
+
+ oInstance1 = oSingleton.get()
+ msgbox oInstance1.dbg_properties
+
+ oCtx = GetDefaultContext()
+ oInstance2 = oSingleton.get( oCtx )
+ msgbox oInstance2.dbg_properties
+
+ ' Uncommenting this should result in an error "Invalid procedure call"
+ oInstanceErr1 = oSingleton.get( 42 )
+End Sub