dom/bindings/parser/tests/test_special_methods_uniqueness.py

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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     threw = False
     5     try:
     6         parser.parse("""
     7             interface SpecialMethodUniqueness1 {
     8               getter deleter boolean (DOMString name);
     9               getter boolean (DOMString name);
    10             };
    11         """)
    13         results = parser.finish()
    14     except:
    15         threw = True
    17     harness.ok(threw, "Should have thrown.")
    19     threw = False
    20     try:
    21         parser.parse("""
    22             interface SpecialMethodUniqueness1 {
    23               deleter boolean (DOMString name);
    24               getter deleter boolean (DOMString name);
    25             };
    26         """)
    28         results = parser.finish()
    29     except:
    30         threw = True
    32     harness.ok(threw, "Should have thrown.")
    34     threw = False
    35     try:
    36         parser.parse("""
    37             interface SpecialMethodUniqueness1 {
    38               setter creator boolean (DOMString name);
    39               creator boolean (DOMString name);
    40             };
    41         """)
    43         results = parser.finish()
    44     except:
    45         threw = True
    47     harness.ok(threw, "Should have thrown.")
    49     threw = False
    50     try:
    51         parser.parse("""
    52             interface SpecialMethodUniqueness1 {
    53               setter boolean (DOMString name);
    54               creator setter boolean (DOMString name);
    55             };
    56         """)
    58         results = parser.finish()
    59     except:
    60         threw = True
    62     harness.ok(threw, "Should have thrown.")

mercurial