1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: online_update.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:03:21 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/******************************************************************************
34 '* owner : joerg.skottke@sun.com
36 '* short description : Hit update button for an extension
38 '\******************************************************************************
40 testcase tExtensionUpdate
42 'warnlog( "#i81543# Office crashes when Testtool executes .exists() method on some objects" )
45 '///<h3>Hit update button for an extension</h3>
48 const EXTENSION_NAME = "ShortLicense.oxt"
50 dim cSampleExtension as string
51 cSampleExtension = gTesttoolPath & "extensions\optional\input\simpleLicense\"
52 cSampleExtension = cSampleExtension & EXTENSION_NAME
53 cSampleExtension = convertpath( cSampleExtension )
55 dim iDocumentsBefore as integer
56 dim iDocumentsAfter as integer
60 if ( dir( cSampleExtension ) <> "" ) then
61 printlog( "Using extension: " & cSampleExtension )
63 warnlog( "Fatal: Sample extension could not be found: " & cSampleExtension )
69 '///+<li>Create a new writer document</li>
72 '///+<li>get the number of open documents (should be 2)</li>
73 iDocumentsBefore = getDocumentCount()
75 '///+<li>Add sample extension "ShortLicense"</li>
76 hExtensionAddGUI( cSampleExtension , "InstallForUser,AcceptLicense,Verbose" )
78 '///+<li>Reopen the Extension Manager</li>
79 printlog( "Reopen Extension Manager" )
82 '///+<li>Click the "Update"-button</li>
83 printlog( "Click the update-button" )
84 kontext "PackageManager"
87 '///+<li>verif y that the update-Dialog is present</li>
88 kontext "ExtensionUpdate"
89 if ( ExtensionUpdate.exists() ) then
90 printlog( "Close update-dialog. Good." )
91 ExtensionUpdate.cancel()
93 warnlog( "Extension update dialog is missing" )
96 '///+<li>Close the Extension Manager"
97 kontext "PackageManager"
98 if ( PackageManager.exists() ) then
99 printlog( "Close Extension Manager" )
100 PackageManager.close()
103 '///+<li>verify that we still have the correct number of documents open</li>
104 iDocumentsAfter = getDocumentCount()
105 if ( iDocumentsAfter <> iDocumentsBefore ) then
106 warnlog( "Incorrect number of documents open. Please verify" )
108 printlog( "Correct number of documents are open. Good" )
111 '///+<li>Close the second document</li>
114 '///+<li>Remove the extension</li>
115 hExtensionRemoveGUI( EXTENSION_NAME )