Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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.")