tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_any_null.py (343B)


      1 import WebIDL
      2 
      3 
      4 def WebIDLTest(parser, harness):
      5    threw = False
      6    try:
      7        parser.parse(
      8            """
      9            interface DoubleNull {
     10              attribute any? foo;
     11            };
     12        """
     13        )
     14 
     15        parser.finish()
     16    except WebIDL.WebIDLError:
     17        threw = True
     18 
     19    harness.ok(threw, "Should have thrown.")