Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / bindings / parser / tests / test_constructor_no_interface_object.py
blobb8f8589f2808ae4b9e50a1354c6342f5e7228eeb
1 import WebIDL
4 def WebIDLTest(parser, harness):
5 threw = False
6 try:
7 parser.parse(
8 """
9 [LegacyNoInterfaceObject]
10 interface TestConstructorLegacyNoInterfaceObject {
11 constructor();
13 """
16 parser.finish()
17 except WebIDL.WebIDLError:
18 threw = True
20 harness.ok(threw, "Should have thrown.")
22 parser = parser.reset()
24 parser.parse(
25 """
26 [LegacyNoInterfaceObject, LegacyFactoryFunction=FooBar]
27 interface TestLegacyFactoryFunctionLegacyNoInterfaceObject {
29 """
32 # Test HTMLConstructor and LegacyNoInterfaceObject
33 parser = parser.reset()
35 threw = False
36 try:
37 parser.parse(
38 """
39 [LegacyNoInterfaceObject]
40 interface TestHTMLConstructorLegacyNoInterfaceObject {
41 [HTMLConstructor] constructor();
43 """
46 parser.finish()
47 except WebIDL.WebIDLError:
48 threw = True
50 harness.ok(threw, "Should have thrown.")