Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / bindings / parser / tests / test_identifier_conflict.py
blob424f4d6285b72958c425d2ab36222da466263282
1 def WebIDLTest(parser, harness):
2 try:
3 parser.parse(
4 """
5 enum Foo { "a" };
6 interface Foo;
7 """
9 parser.finish()
10 harness.ok(False, "Should fail to parse")
11 except Exception as e:
12 harness.ok(
13 "Name collision" in str(e), "Should have name collision for interface"
16 parser = parser.reset()
17 try:
18 parser.parse(
19 """
20 dictionary Foo { long x; };
21 enum Foo { "a" };
22 """
24 parser.finish()
25 harness.ok(False, "Should fail to parse")
26 except Exception as e:
27 harness.ok(
28 "Name collision" in str(e), "Should have name collision for dictionary"
31 parser = parser.reset()
32 try:
33 parser.parse(
34 """
35 enum Foo { "a" };
36 enum Foo { "b" };
37 """
39 parser.finish()
40 harness.ok(False, "Should fail to parse")
41 except Exception as e:
42 harness.ok(
43 "Multiple unresolvable definitions" in str(e),
44 "Should have name collision for dictionary",