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: help_compare_content.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:14 $
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 :
38 '\******************************************************************************
40 testcase tCompareHelpContent()
42 if ( gIsoLang <> "en-US" ) then
43 printlog( "No testing for languages other than en_US" )
47 '///<h1>Compare the help content in the Help-Viewer against a reference</h1>
48 '///<h2>help_compare_content::tCompareHelpContent</h2>
50 '///+<li>Open the Help-Viewer</li>
51 '///+<li>Go to the Content-Page</li>
52 '///+<li>Read all entries in the Content-Treelist</li>
53 '///+<li>Close the Help</li>
54 '///+<li>Compare the list to a reference</li>
57 ' file related variables
58 dim sFileOut as string
60 dim sFileName as string
62 ' the array that holds the names of the applications
63 dim aTopicsFromUI( 1200 ) as string
65 ' some incremant variables and temporary stuff
66 dim iTopicsFromUI as integer
67 dim iCurrentItem as integer
68 dim sCurrentItem as string
72 ' define input and output paths, presetting variables
73 sFileName = gProductName & "_help_content_" & gIsoLang & ".txt"
74 sFileOut = hGetWorkFile( sFilename )
75 sFileIn = gTesttoolPath & "framework\optional\input\help_browser\"
76 sFileIn = convertpath( sFileIn & sFileName )
78 aTopicsFromUI( 0 ) = "0"
80 ' get the names from the listbox
83 warnlog( "Help not open, aborting test" )
87 hSelectHelpTab( "content" )
89 ' find out, how many items we have in the list
90 iTopicsFromUI = hExpandAllNodes( SearchContent )
91 printlog( "Reading " & iTopicsFromUI & " items from Content Treelist" )
93 ' get all topics from the contents-treelist
94 hGetVisibleNodeNames( SearchContent , aTopicsFromUI() )
98 ' Compare the list against a reference or create a new list, if the
99 ' reference does not exist
101 printlog( "Beginning comparision" )
102 irc = hManageComparisionList( sFileIn, sFileOut, aTopicsFromUI() )
104 warnlog( "Something went wrong, please review the log." )