Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 def WebIDLTest(parser, harness):
2 threw = False
3 try:
4 parser.parse("""
5 interface OneNullableInUnion {
6 void foo((object? or DOMString?) arg);
7 };
8 """)
10 results = parser.finish()
11 except:
12 threw = True
14 harness.ok(threw,
15 "Two nullable member types of a union should have thrown.")
17 parser.reset()
18 threw = False
20 try:
21 parser.parse("""
22 interface NullableInNullableUnion {
23 void foo((object? or DOMString)? arg);
24 };
25 """)
27 results = parser.finish()
28 except:
29 threw = True
31 harness.ok(threw,
32 "A nullable union type with a nullable member type should have "
33 "thrown.")
35 parser.reset()
36 threw = False
38 try:
39 parser.parse("""
40 interface NullableInUnionNullableUnionHelper {
41 };
42 interface NullableInUnionNullableUnion {
43 void foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg);
44 };
45 """)
47 results = parser.finish()
48 except:
49 threw = True
51 harness.ok(threw,
52 "A nullable union type with a nullable member type should have "
53 "thrown.")