Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 def WebIDLTest(parser, harness):
2 threw = False
3 try:
4 parser.parse("""
5 interface IdentifierConflictAcrossMembers1 {
6 const byte thing1 = 1;
7 readonly attribute long thing1;
8 };
9 """)
11 results = parser.finish()
12 except:
13 threw = True
15 harness.ok(threw, "Should have thrown.")
17 threw = False
18 try:
19 parser.parse("""
20 interface IdentifierConflictAcrossMembers2 {
21 readonly attribute long thing1;
22 const byte thing1 = 1;
23 };
24 """)
26 results = parser.finish()
27 except:
28 threw = True
30 harness.ok(threw, "Should have thrown.")
32 threw = False
33 try:
34 parser.parse("""
35 interface IdentifierConflictAcrossMembers3 {
36 getter boolean thing1(DOMString name);
37 readonly attribute long thing1;
38 };
39 """)
41 results = parser.finish()
42 except:
43 threw = True
45 harness.ok(threw, "Should have thrown.")
47 threw = False
48 try:
49 parser.parse("""
50 interface IdentifierConflictAcrossMembers1 {
51 const byte thing1 = 1;
52 long thing1();
53 };
54 """)
56 results = parser.finish()
57 except:
58 threw = True
60 harness.ok(threw, "Should have thrown.")