1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 def should_throw(parser
, harness
, message
, code
):
9 parser
= parser
.reset()
14 except WebIDL
.WebIDLError
:
17 harness
.ok(threw
, "Should have thrown: %s" % message
)
20 def WebIDLTest(parser
, harness
):
21 # The [LegacyLenientSetter] extended attribute MUST take no arguments.
28 [LegacyLenientSetter=X] readonly attribute long A;
33 # An attribute with the [LegacyLenientSetter] extended attribute MUST NOT
34 # also be declared with the [PutForwards] extended attribute.
41 [PutForwards=B, LegacyLenientSetter] readonly attribute J A;
49 # An attribute with the [LegacyLenientSetter] extended attribute MUST NOT
50 # also be declared with the [Replaceable] extended attribute.
57 [Replaceable, LegacyLenientSetter] readonly attribute J A;
62 # The [LegacyLenientSetter] extended attribute MUST NOT be used on an
63 # attribute that is not read only.
70 [LegacyLenientSetter] attribute long A;
75 # The [LegacyLenientSetter] extended attribute MUST NOT be used on a
83 [LegacyLenientSetter] static readonly attribute long A;