1*b1cdbd2cSJim Jagielski#**************************************************************
2*b1cdbd2cSJim Jagielski#
3*b1cdbd2cSJim Jagielski#  Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski#  or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski#  distributed with this work for additional information
6*b1cdbd2cSJim Jagielski#  regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski#  to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski#  "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski#  with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski#
11*b1cdbd2cSJim Jagielski#    http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski#
13*b1cdbd2cSJim Jagielski#  Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski#  software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski#  KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski#  specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski#  under the License.
19*b1cdbd2cSJim Jagielski#
20*b1cdbd2cSJim Jagielski#**************************************************************
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielskino-description.oxt, no-dependencies.oxt, empty-dependencies.oxt effectively have
23*b1cdbd2cSJim Jagielskino dependencies and should thus install successfully.
24*b1cdbd2cSJim Jagielski
25*b1cdbd2cSJim Jagielskibroken-dependencies.oxt contains a malformed description.xml and should thus
26*b1cdbd2cSJim Jagielskidisplay an error and not install.
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielskidouble-dependencies.oxt contains a description.xml with two dependencies
29*b1cdbd2cSJim Jagielskielements.  This is not allowed by the spec but behaviour is unspecified.  In the
30*b1cdbd2cSJim Jagielskicurrent implementation, it combines the two elements, and thus finds two
31*b1cdbd2cSJim Jagielskiunsatisfied dependencies, displays the Unsatisfied Dependencies dialog and does
32*b1cdbd2cSJim Jagielskinot install.
33*b1cdbd2cSJim Jagielski
34*b1cdbd2cSJim Jagielskiversion21.oxt contains a dependency on OOo 2.1 (and should thus only install in
35*b1cdbd2cSJim JagielskiOOo 2.1 or later); version21ns.oxt is the same, but with a different way of
36*b1cdbd2cSJim Jagielskiusing XML namespaces; version21other.oxt additionally contains an unsatisfied
37*b1cdbd2cSJim Jagielskidependency (and should thus not install in any OOo version).  version22.oxt
38*b1cdbd2cSJim Jagielskicontains a dependency on OOo 2.2 (and should thus only install in OOo 2.2 or
39*b1cdbd2cSJim Jagielskilater).  version23.oxt contains a dependency on OOo 2.3 (and should thus only
40*b1cdbd2cSJim Jagielskiinstall in OOo 2.3 or later).  version10000.oxt contains a dependency on the
41*b1cdbd2cSJim Jagielskihypothetical OOo version 10000 (and should thus not install in any OOo version).
42*b1cdbd2cSJim Jagielskiversionempty.oxt contains an empty value attribute and versionnone.oxt lacks the
43*b1cdbd2cSJim Jagielskivalue attribute; neither is allowed by the spec, but the current implementation
44*b1cdbd2cSJim Jagielskitreats both as pre OOo 2.1 versions (and the extensions should thus install in
45*b1cdbd2cSJim JagielskiOOo 2.1 or later).
46*b1cdbd2cSJim Jagielski
47*b1cdbd2cSJim Jagielskimaxversion30.oxt contains a maximal version dependency on OOo 3.0 (and should
48*b1cdbd2cSJim Jagielskithus only install in OOo 3.0 or earlier, back to OOo 2.3, thanks to the
49*b1cdbd2cSJim Jagielskiadditionally specified OpenOffice.org-minimal-version attribute).
50*b1cdbd2cSJim Jagielskimaxversion10000.oxt contains a maximal version dependency on the hypothetical
51*b1cdbd2cSJim JagielskiOOo version 10000 (and should thus install in any OOo version 3.1 or later;
52*b1cdbd2cSJim JagielskiOpenOffice.org-maximal-version was introduced in OOo 3.1, and no OpenOffice.org-
53*b1cdbd2cSJim Jagielskiminimal-version attribute is specified).  bad-minmaxversion.oxt contains a
54*b1cdbd2cSJim Jagielskiminimal version dependency on OOo 3.2 and a maximal version dependency on
55*b1cdbd2cSJim JagielskiOOo 3.1 (and should thus not install in any OOo version).
56*b1cdbd2cSJim Jagielski
57*b1cdbd2cSJim Jagielskiminattr22.oxt contains a (hypothetical, most probably never satisfied)
58*b1cdbd2cSJim JagielskiUNSATISFIED dependency with an OpenOffice.org-minimal-version attribute of
59*b1cdbd2cSJim Jagielski"2.2" (and should thus install in OOo 2.3 or later); minattr23.oxt is similar,
60*b1cdbd2cSJim Jagielskibut with an OpenOffice.org-minimal-version attribute of "2.3" (and should thus
61*b1cdbd2cSJim Jagielskialso install in OOo 2.3 or later); minattr24.oxt is similar, but with an
62*b1cdbd2cSJim JagielskiOpenOffice.org-minimal-version attribute of "2.4" (and should thus only install
63*b1cdbd2cSJim Jagielskiin OOo 2.4 or later).
64*b1cdbd2cSJim Jagielski
65*b1cdbd2cSJim JagielskiAll of the following testcases should result in the Unsatisfied Dependencies
66*b1cdbd2cSJim Jagielskidialog being displayed and the extension not being installed:
67*b1cdbd2cSJim Jagielski
68*b1cdbd2cSJim Jagielskiunknown-dependency.oxt contains a dependency without a name attribute, and
69*b1cdbd2cSJim Jagielskishould thus display "Unknown" (localized).
70*b1cdbd2cSJim Jagielski
71*b1cdbd2cSJim Jagielskifunny-dependency.oxt, many-dependencies.oxt contain somewhat extreme input.
72*b1cdbd2cSJim Jagielski
73*b1cdbd2cSJim Jagielskilicense-dependency.oxt contains both a license to be accepted by the user and
74*b1cdbd2cSJim Jagielskidependencies.  What is important here is that the Unsatisfied Dependencies
75*b1cdbd2cSJim Jagielskidialog is displayed, but not the license (as installation aborts as soon as
76*b1cdbd2cSJim Jagielskiunsatisfied dependencies are found).
77