Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 import WebIDL
3 def WebIDLTest(parser, harness):
4 parser.parse("""
5 interface TestStringifier {
6 stringifier;
7 };
8 """)
10 results = parser.finish()
12 harness.ok(isinstance(results[0].members[0], WebIDL.IDLMethod),
13 "Stringifer should be method")
15 parser = parser.reset()
17 threw = False
18 try:
19 parser.parse("""
20 interface TestStringifier {
21 stringifier;
22 stringifier;
23 };
24 """)
25 results = parser.finish()
26 except:
27 threw = True
29 harness.ok(threw, "Should not allow two 'stringifier;'")
31 parser = parser.reset()
33 threw = False
34 try:
35 parser.parse("""
36 interface TestStringifier {
37 stringifier;
38 stringifier DOMString foo();
39 };
40 """)
41 results = parser.finish()
42 except:
43 threw = True
45 harness.ok(threw, "Should not allow a 'stringifier;' and a 'stringifier()'")