diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-08-05 17:16:04 +0200 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-08-05 17:16:04 +0200 |
commit | b980c014e3d19450a169347243c7609b63864b9a (patch) | |
tree | f74a8b7f338402c09462784f9d3b86eb1c292451 /testautomation/framework/optional/includes/security_incorrect_password.inc | |
parent | 924eab5afc99b0b0ecfa76ac4606a058e0d67328 (diff) | |
parent | 7bbf7ff48ffcd5a6dcfc46c31d95df33c360e4ee (diff) |
cws tl82: merge with DEV300_m86
Diffstat (limited to 'testautomation/framework/optional/includes/security_incorrect_password.inc')
-rwxr-xr-x[-rw-r--r--] | testautomation/framework/optional/includes/security_incorrect_password.inc | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/testautomation/framework/optional/includes/security_incorrect_password.inc b/testautomation/framework/optional/includes/security_incorrect_password.inc index eedbc8c67896..8e6eb2deffee 100644..100755 --- a/testautomation/framework/optional/includes/security_incorrect_password.inc +++ b/testautomation/framework/optional/includes/security_incorrect_password.inc @@ -25,44 +25,38 @@ ' '/************************************************************************ '* -'* owner : joerg.skottke@sun.com +'* owner : joerg.skottke@oracle.com '* '* short description : Password protect files '* '\****************************************************************************** testcase tIncorrectPassword( filetypeID as string ) - - const WORKFILE = "password" - dim suffix as string - dim workpath as string - - dim rc as integer - dim brc as boolean dim iCurrentFilter as integer dim cCurrentFilter as string + dim filepath as string const PASSWORD_VALID = "MyPasswd09#+1" const PASSWORD_FALSE = "MyPasswd00#+1" const DOC_ID = "f_sec_incorrect_password.bas testdocument" - - workpath = hGetWorkPath() - - suffix = hGetSuffix( filetypeID ) + + printlog( "Build a valid filename with full path and suffix" ) + filepath = hGetWorkPath() & "password" & hGetSuffix( filetypeID ) + printlog( "The workfile is: " & filepath ) printlog( "Delete the workfile - if it was left over by a former testrun" ) - hDeleteFile( workpath & WORKFILE & suffix ) + hDeleteFile( filepath ) printlog( "Make sure we have exactly one single document open" ) hFileCloseAll() - hCreateDocument() + hCreateDocument() ' Do not use hInitSingleDoc() here as it creates a Writer document printlog( "Change the document" ) hChangeDoc() printlog( "Click on FileSave" ) - FileSave + hUseAsyncSlot( "FileSave" ) Kontext "SpeichernDlg" if ( SpeichernDlg.exists( 1 ) ) then @@ -92,9 +86,7 @@ testcase tIncorrectPassword( filetypeID as string ) printlog( "Click on the Save-Button" ) Speichern.click() - brc = hSecurityEnterPasswordOnSave( PASSWORD_VALID ) - - if ( brc ) then + if ( hSecurityEnterPasswordOnSave( PASSWORD_VALID ) ) then kontext "AlienWarning" if ( AlienWarning.exists( 3 ) ) then @@ -107,8 +99,7 @@ testcase tIncorrectPassword( filetypeID as string ) endif printlog( "Close the document" ) - brc = hDestroyDocument() - if ( not brc ) then + if ( not hDestroyDocument() ) then warnlog( "Something went wrong while closing the document. please check" ) endif @@ -118,8 +109,7 @@ testcase tIncorrectPassword( filetypeID as string ) printlog( "Load the file again" ) hFileOpen( workpath & WORKFILE & suffix ) - brc = hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false ) - if ( not brc ) then + if ( not hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false ) ) then warnlog( "Something went wrong while using the password dialog" ) endif |