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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : thorsten.bosbach@oracle.com
30 '* short description : general options test (test for internet-group)
32 '\******************************************************************************
34 testcase tInternetProxy
36 Dim lsSave ( 9 ) as String
41 hToolsOptions ( "Internet", "Proxy" )
43 printlog " - save settings"
44 iSave = ProxyServer.GetSelIndex
45 ProxyServer.Select ( ProxyServer.GetItemCount )
46 if ProxyServer.GetItemCount > 2 then Warnlog "More than 2 entries are available for ProxyServer-Setting => Bug 88387"
48 lsSave (1) = HTTPProxy.GetText
49 lsSave (2) = HTTPPort.GetText
50 lsSave (3) = FTPProxy.GetText
51 lsSave (4) = FTPPort.GetText
52 lsSave (7) = NoProxy.GetText
54 printlog " - change settings"
55 HTTPProxy.SetText "staroffice-news.germany.sun.com.test"
56 HTTPPort.SetText "1508"
57 FTPProxy.SetText "staroffice-news.germany.sun.com.test"
58 FTPPort.SetText "1509"
59 NoProxy.SetText "staroffice;stardivision;starstarstar"
61 Kontext "ExtrasOptionenDlg"
67 printlog " - exit/restart StarOffice"
70 printlog " - check changes"
72 hToolsOptions ( "Internet", "Proxy" )
74 if ProxyServer.GetSelIndex <> ProxyServer.GetItemCount then
75 Warnlog "Proxy Server => changes not saved ( should be the last entry )!"
76 ProxyServer.Select ( ProxyServer.GetItemCount )
79 if HTTPProxy.GetText <> "staroffice-news.germany.sun.com.test" then warnlog "HTTP Proxy => changes not saved!"
80 if FTPProxy.GetText <> "staroffice-news.germany.sun.com.test" then warnlog "FTP Proxy => changes not saved!"
81 if NoProxy.GetText <> "staroffice;stardivision;starstarstar" then warnlog "No Proxy => changes not saved!"
82 if HTTPPort.GetText <> "1508" then warnlog "HTTP Port => changes not saved!"
83 if FTPPort.GetText <> "1509" then warnlog "FTP Port => changes not saved!"
85 if gPlatgroup = "w95" then
86 printlog " - change settings ( only windows )"
89 Kontext "ExtrasOptionenDlg"
93 printlog " - check changes"
95 hToolsOptions ( "Internet", "Proxy" )
97 if ProxyServer.GetSelIndex <> 2 then Warnlog "Proxy Server => changes not saved ( should be the 2nd entry )!"
100 printlog " - reset settings"
101 ProxyServer.Select(3) ' manual
102 HTTPProxy.SetText lsSave (1)
103 HTTPPort.SetText lsSave (2)
104 FTPProxy.SetText lsSave (3)
105 FTPPort.SetText lsSave (4)
106 NoProxy.SetText lsSave (7)
107 ProxyServer.Select iSave
109 Kontext "ExtrasOptionenDlg"
113 printlog " - check default"
115 hToolsOptions ( "Internet", "Proxy" )
116 if ProxyServer.GetSelIndex <> iSave then Warnlog "Proxy Server => changes not saved!"
117 if HTTPProxy.GetText <> lsSave (1) then warnlog "HTTP Proxy => changes not saved!"
118 if FTPProxy.GetText <> lsSave (3) then warnlog "FTP Proxy => changes not saved!"
119 if NoProxy.GetText <> lsSave (7) then warnlog "No Proxy => changes not saved!"
120 if FTPPort.GetText <> lsSave (4) AND FTPPort.GetText <> "0" then warnlog "FTP Port => changes not saved!"
121 if HTTPPort.GetText <> lsSave (2) AND HTTPPort.GetText <> "0" then warnlog "HTTP Port => changes not saved!"
123 Kontext "ExtrasOptionenDlg"
129 testcase tInternetSearch
130 Dim iSave, iInterim, i as Integer
131 Dim lbSave ( 3, 10 ) as boolean
132 Dim lsSave ( 6, 10 ) as String
137 hToolsOptions ( "Internet", "Search" )
139 printlog " - save settings"
140 iSave = SuchenIn.GetItemCount
142 Warnlog "Please change the index for this test, there are too many entries in the Search-List!"
148 lsSave (1, i) = DienstName.GetText
149 lsSave (2, i) = Praefix.GetText
150 lsSave (3, i) = Suffix.GetText
151 lsSave (4, i) = Trenner.GetText
152 lsSave (5, i) = Schreibstil.GetSelText
154 lbSave (1, i) = Und.IsChecked
155 lbSave (2, i) = Oder.IsChecked
156 lbSave (3, i) = Exakt.IsChecked
159 printlog " - change/insert settings"
162 DienstName.SetText "AAAA_TT_Changes_Name"
164 Praefix.SetText "TT_Changes_Prefix"
165 Suffix.SetText "TT_Changes_Suffix"
166 Trenner.SetText ";;;;"
174 DienstName.SetText "ZZZZ_TT_New_Name"
176 Praefix.SetText "TT_New_Prefix"
177 Suffix.SetText "TT_New_Suffix"
178 Trenner.SetText ":::::"
182 Kontext "ExtrasOptionenDlg"
188 printlog " - exit/restart StarOffice"
191 printlog " - check changes"
193 hToolsOptions ( "Internet", "Search" )
195 iInterim = SuchenIn.GetItemCount
197 Warnlog "No entrie in Search-List, entries are not saved! The test ends here! => BugID: 82922"
199 if iInterim <> ( iSave + 1 ) then
200 Warnlog "Not all entries in the Search-List are saved! => BugID: 82922"
204 SuchenIn.Select "AAAA_TT_Changes_Name"
205 if DienstName.GetText <> "AAAA_TT_Changes_Name" then Warnlog "AAAA_TT_Changes_Name : Name => changes not saved"
207 if Praefix.GetText <> "TT_Changes_Prefix" then Warnlog "AAAA_TT_Changes_Name : Prefix => changes not saved!"
208 if Suffix.GetText <> "TT_Changes_Suffix" then Warnlog "AAAA_TT_Changes_Name : Suffix => changes not saved!"
209 if Trenner.GetText <> ";;;;" then Warnlog "AAAA_TT_Changes_Name : Seperator => changes not saved!"
210 if Schreibstil.GetSelIndex <> 3 then Warnlog "AAAA_TT_Changes_Name : Case match => changes not saved! BugID:86660"
212 if i <> ( iSave + 1 ) then
214 if DienstName.GetText <> lsSave (1, i) then Warnlog lsSave (1, i) + " : Name => old entry not saved correctly!"
215 if Und.IsChecked <> lbSave (1, i) then Warnlog lsSave (1, i) + " : Und => old entry not saved correctly!"
216 if Oder.IsChecked <> lbSave (2, i) then Warnlog lsSave (1, i) + " : Oder => old entry not saved correctly!"
217 if Exakt.IsChecked <> lbSave (3, i) then Warnlog lsSave (1, i) + " : Exakt => old entry not saved correctly!"
218 if Praefix.GetText <> lsSave (2, i) then Warnlog lsSave (1, i) + " : Prefix => old entry not saved correctly!"
219 if Suffix.GetText <> lsSave (3, i) then Warnlog lsSave (1, i) + " : Suffix => old entry not saved correctly!"
220 if Trenner.GetText <> lsSave (4, i) then Warnlog lsSave (1, i) + " : Seperator => old entry not saved correctly!"
221 if Schreibstil.GetSelText <> lsSave (5, i) then Warnlog lsSave (1, i) + " : Case match => old entry not saved correctly!"
223 SuchenIn.Select "ZZZZ_TT_New_Name"
224 if DienstName.GetText <> "ZZZZ_TT_New_Name" then Warnlog "ZZZZ_TT_New_Name : Name => new entry not saved correctly!"
226 if Praefix.GetText <> "TT_New_Prefix" then Warnlog "ZZZZ_TT_New_Name : Prefix => new entry not saved correctly!"
227 if Suffix.GetText <> "TT_New_Suffix" then Warnlog "ZZZZ_TT_New_Name : Suffix => new entry not saved correctly!"
228 if Trenner.GetText <> ":::::" then Warnlog "ZZZZ_TT_New_Name : Seperator => new entry not saved correctly!"
229 if Schreibstil.GetSelIndex <> 2 then Warnlog "ZZZZ_TT_New_Name : Case match => new entry not saved correctly! BugID:86660"
235 printlog " - reset settings"
236 SuchenIn.Select "AAAA_TT_Changes_Name"
237 DienstName.SetText lsSave (1, 1)
238 if lbSave(1, 1) = TRUE then Und.Check
239 if lbSave(2, 1) = TRUE then Oder.Check
240 if lbSave(3, 1) = TRUE then Exakt.Check
241 Praefix.SetText lsSave (2, 1)
242 Suffix.SetText lsSave (3, 1)
243 Trenner.SetText lsSave (4, 1)
244 Schreibstil.Select lsSave (5, 1)
249 SuchenIn.Select "ZZZZ_TT_New_Name"
254 Kontext "ExtrasOptionenDlg"
258 printlog " - check the reset"
260 hToolsOptions ( "Internet", "Search" )
262 iInterim = SuchenIn.GetItemCount
263 if iInterim <> iSave then
264 Warnlog "The default can't be reached!"
267 SuchenIn.Select lsSave (1, i)
268 if DienstName.GetText <> lsSave (1, i) then Warnlog lsSave (1, i) + " : Name => old entry not saved correctly!"
269 if Und.IsChecked <> lbSave (1, i) then Warnlog lsSave (1, i) + " : Und => old entry not saved correctly!"
270 if Oder.IsChecked <> lbSave (2, i) then Warnlog lsSave (1, i) + " : Oder => old entry not saved correctly!"
271 if Exakt.IsChecked <> lbSave (3, i) then Warnlog lsSave (1, i) + " : Exakt => old entry not saved correctly!"
272 if Praefix.GetText <> lsSave (2, i) then Warnlog lsSave (1, i) + " : Prefix => old entry not saved correctly!"
273 if Suffix.GetText <> lsSave (3, i) then Warnlog lsSave (1, i) + " : Suffix => old entry not saved correctly!"
274 if Trenner.GetText <> lsSave (4, i) then Warnlog lsSave (1, i) + " : Seperator => old entry not saved correctly!"
275 if Schreibstil.GetSelText <> lsSave (5, i) then Warnlog lsSave (1, i) + " : Case match => old entry not saved correctly!"
280 Kontext "ExtrasOptionenDlg"