Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / bindings / parser / tests / test_duplicate_qualifiers.py
blobbb02f96acfb5098b7055b45dd4ea0d1f22fb7f66
1 import WebIDL
4 def WebIDLTest(parser, harness):
5 threw = False
6 try:
7 parser.parse(
8 """
9 interface DuplicateQualifiers1 {
10 getter getter byte foo(unsigned long index);
12 """
15 parser.finish()
16 except WebIDL.WebIDLError:
17 threw = True
19 harness.ok(threw, "Should have thrown.")
21 threw = False
22 try:
23 parser.parse(
24 """
25 interface DuplicateQualifiers2 {
26 setter setter byte foo(unsigned long index, byte value);
28 """
31 parser.finish()
32 except WebIDL.WebIDLError:
33 threw = True
35 harness.ok(threw, "Should have thrown.")
37 threw = False
38 try:
39 parser.parse(
40 """
41 interface DuplicateQualifiers4 {
42 deleter deleter byte foo(unsigned long index);
44 """
47 parser.finish()
48 except WebIDL.WebIDLError:
49 threw = True
51 harness.ok(threw, "Should have thrown.")
53 threw = False
54 try:
55 parser.parse(
56 """
57 interface DuplicateQualifiers5 {
58 getter deleter getter byte foo(unsigned long index);
60 """
63 parser.finish()
64 except WebIDL.WebIDLError:
65 threw = True
67 harness.ok(threw, "Should have thrown.")