Warning, /network/falkon/src/plugins/TabManager/tldextractor/data/test_psl.txt is written in an unsupported language. File is not indexed.

0001 // Any copyright is dedicated to the Public Domain.
0002 // http://creativecommons.org/publicdomain/zero/1.0/
0003 
0004 // null input.
0005 checkPublicSuffix(null, null);
0006 // Mixed case.
0007 checkPublicSuffix('COM', null);
0008 checkPublicSuffix('example.COM', 'example.com');
0009 checkPublicSuffix('WwW.example.COM', 'example.com');
0010 // Leading dot.
0011 checkPublicSuffix('.com', null);
0012 checkPublicSuffix('.example', null);
0013 checkPublicSuffix('.example.com', null);
0014 checkPublicSuffix('.example.example', null);
0015 // Unlisted TLD.
0016 checkPublicSuffix('example', null);
0017 checkPublicSuffix('example.example', 'example.example');
0018 checkPublicSuffix('b.example.example', 'example.example');
0019 checkPublicSuffix('a.b.example.example', 'example.example');
0020 // Listed, but non-Internet, TLD.
0021 //checkPublicSuffix('local', null);
0022 //checkPublicSuffix('example.local', null);
0023 //checkPublicSuffix('b.example.local', null);
0024 //checkPublicSuffix('a.b.example.local', null);
0025 // TLD with only 1 rule.
0026 checkPublicSuffix('biz', null);
0027 checkPublicSuffix('domain.biz', 'domain.biz');
0028 checkPublicSuffix('b.domain.biz', 'domain.biz');
0029 checkPublicSuffix('a.b.domain.biz', 'domain.biz');
0030 // TLD with some 2-level rules.
0031 checkPublicSuffix('com', null);
0032 checkPublicSuffix('example.com', 'example.com');
0033 checkPublicSuffix('b.example.com', 'example.com');
0034 checkPublicSuffix('a.b.example.com', 'example.com');
0035 checkPublicSuffix('uk.com', null);
0036 checkPublicSuffix('example.uk.com', 'example.uk.com');
0037 checkPublicSuffix('b.example.uk.com', 'example.uk.com');
0038 checkPublicSuffix('a.b.example.uk.com', 'example.uk.com');
0039 checkPublicSuffix('test.ac', 'test.ac');
0040 // TLD with only 1 (wildcard) rule.
0041 checkPublicSuffix('cy', null);
0042 checkPublicSuffix('c.cy', null);
0043 checkPublicSuffix('b.c.cy', 'b.c.cy');
0044 checkPublicSuffix('a.b.c.cy', 'b.c.cy');
0045 // More complex TLD.
0046 checkPublicSuffix('jp', null);
0047 checkPublicSuffix('test.jp', 'test.jp');
0048 checkPublicSuffix('www.test.jp', 'test.jp');
0049 checkPublicSuffix('ac.jp', null);
0050 checkPublicSuffix('test.ac.jp', 'test.ac.jp');
0051 checkPublicSuffix('www.test.ac.jp', 'test.ac.jp');
0052 checkPublicSuffix('kyoto.jp', null);
0053 checkPublicSuffix('test.kyoto.jp', 'test.kyoto.jp');
0054 checkPublicSuffix('ide.kyoto.jp', null);
0055 checkPublicSuffix('b.ide.kyoto.jp', 'b.ide.kyoto.jp');
0056 checkPublicSuffix('a.b.ide.kyoto.jp', 'b.ide.kyoto.jp');
0057 checkPublicSuffix('c.kobe.jp', null);
0058 checkPublicSuffix('b.c.kobe.jp', 'b.c.kobe.jp');
0059 checkPublicSuffix('a.b.c.kobe.jp', 'b.c.kobe.jp');
0060 checkPublicSuffix('city.kobe.jp', 'city.kobe.jp');
0061 checkPublicSuffix('www.city.kobe.jp', 'city.kobe.jp');
0062 // TLD with a wildcard rule and exceptions.
0063 checkPublicSuffix('ck', null);
0064 checkPublicSuffix('test.ck', null);
0065 checkPublicSuffix('b.test.ck', 'b.test.ck');
0066 checkPublicSuffix('a.b.test.ck', 'b.test.ck');
0067 checkPublicSuffix('www.ck', 'www.ck');
0068 checkPublicSuffix('www.www.ck', 'www.ck');
0069 // US K12.
0070 checkPublicSuffix('us', null);
0071 checkPublicSuffix('test.us', 'test.us');
0072 checkPublicSuffix('www.test.us', 'test.us');
0073 checkPublicSuffix('ak.us', null);
0074 checkPublicSuffix('test.ak.us', 'test.ak.us');
0075 checkPublicSuffix('www.test.ak.us', 'test.ak.us');
0076 checkPublicSuffix('k12.ak.us', null);
0077 checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us');
0078 checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us');
0079 // IDN labels.
0080 checkPublicSuffix('食狮.com.cn', '食狮.com.cn');
0081 checkPublicSuffix('食狮.公司.cn', '食狮.公司.cn');
0082 checkPublicSuffix('www.食狮.公司.cn', '食狮.公司.cn');
0083 checkPublicSuffix('shishi.公司.cn', 'shishi.公司.cn');
0084 checkPublicSuffix('公司.cn', null);
0085 checkPublicSuffix('食狮.中国', '食狮.中国');
0086 checkPublicSuffix('www.食狮.中国', '食狮.中国');
0087 checkPublicSuffix('shishi.中国', 'shishi.中国');
0088 checkPublicSuffix('中国', null);
0089 // Same as above, but punycoded.
0090 checkPublicSuffix('xn--85x722f.com.cn', 'xn--85x722f.com.cn');
0091 checkPublicSuffix('xn--85x722f.xn--55qx5d.cn', 'xn--85x722f.xn--55qx5d.cn');
0092 checkPublicSuffix('www.xn--85x722f.xn--55qx5d.cn', 'xn--85x722f.xn--55qx5d.cn');
0093 checkPublicSuffix('shishi.xn--55qx5d.cn', 'shishi.xn--55qx5d.cn');
0094 checkPublicSuffix('xn--55qx5d.cn', null);
0095 checkPublicSuffix('xn--85x722f.xn--fiqs8s', 'xn--85x722f.xn--fiqs8s');
0096 checkPublicSuffix('www.xn--85x722f.xn--fiqs8s', 'xn--85x722f.xn--fiqs8s');
0097 checkPublicSuffix('shishi.xn--fiqs8s', 'shishi.xn--fiqs8s');
0098 checkPublicSuffix('xn--fiqs8s', null);