Bug 779845 - Incorporate the PSL test into our test system. r=bsmith.

This commit is contained in:
Masatoshi Kimura 2012-08-24 14:03:15 +01:00
Родитель e5d9d202ca
Коммит f33bf4e7f8
2 изменённых файлов: 40 добавлений и 39 удалений

Просмотреть файл

@ -1,78 +1,78 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/
# NULL input.
checkPublicSuffix(NULL, NULL);
# Mixed case.
checkPublicSuffix('COM', NULL);
// null input.
checkPublicSuffix(null, null);
// Mixed case.
checkPublicSuffix('COM', null);
checkPublicSuffix('example.COM', 'example.com');
checkPublicSuffix('WwW.example.COM', 'example.com');
# Leading dot.
checkPublicSuffix('.com', NULL);
checkPublicSuffix('.example', NULL);
checkPublicSuffix('.example.com', NULL);
checkPublicSuffix('.example.example', NULL);
# Unlisted TLD.
checkPublicSuffix('example', NULL);
// Leading dot.
checkPublicSuffix('.com', null);
checkPublicSuffix('.example', null);
checkPublicSuffix('.example.com', null);
checkPublicSuffix('.example.example', null);
// Unlisted TLD.
checkPublicSuffix('example', null);
checkPublicSuffix('example.example', 'example.example');
checkPublicSuffix('b.example.example', 'example.example');
checkPublicSuffix('a.b.example.example', 'example.example');
# Listed, but non-Internet, TLD.
#checkPublicSuffix('local', NULL);
#checkPublicSuffix('example.local', NULL);
#checkPublicSuffix('b.example.local', NULL);
#checkPublicSuffix('a.b.example.local', NULL);
# TLD with only 1 rule.
checkPublicSuffix('biz', NULL);
// Listed, but non-Internet, TLD.
//checkPublicSuffix('local', null);
//checkPublicSuffix('example.local', null);
//checkPublicSuffix('b.example.local', null);
//checkPublicSuffix('a.b.example.local', null);
// TLD with only 1 rule.
checkPublicSuffix('biz', null);
checkPublicSuffix('domain.biz', 'domain.biz');
checkPublicSuffix('b.domain.biz', 'domain.biz');
checkPublicSuffix('a.b.domain.biz', 'domain.biz');
# TLD with some 2-level rules.
checkPublicSuffix('com', NULL);
// TLD with some 2-level rules.
checkPublicSuffix('com', null);
checkPublicSuffix('example.com', 'example.com');
checkPublicSuffix('b.example.com', 'example.com');
checkPublicSuffix('a.b.example.com', 'example.com');
checkPublicSuffix('uk.com', NULL);
checkPublicSuffix('uk.com', null);
checkPublicSuffix('example.uk.com', 'example.uk.com');
checkPublicSuffix('b.example.uk.com', 'example.uk.com');
checkPublicSuffix('a.b.example.uk.com', 'example.uk.com');
checkPublicSuffix('test.ac', 'test.ac');
# TLD with only 1 (wildcard) rule.
checkPublicSuffix('cy', NULL);
checkPublicSuffix('c.cy', NULL);
// TLD with only 1 (wildcard) rule.
checkPublicSuffix('cy', null);
checkPublicSuffix('c.cy', null);
checkPublicSuffix('b.c.cy', 'b.c.cy');
checkPublicSuffix('a.b.c.cy', 'b.c.cy');
# More complex TLD.
checkPublicSuffix('jp', NULL);
// More complex TLD.
checkPublicSuffix('jp', null);
checkPublicSuffix('test.jp', 'test.jp');
checkPublicSuffix('www.test.jp', 'test.jp');
checkPublicSuffix('ac.jp', NULL);
checkPublicSuffix('ac.jp', null);
checkPublicSuffix('test.ac.jp', 'test.ac.jp');
checkPublicSuffix('www.test.ac.jp', 'test.ac.jp');
checkPublicSuffix('kyoto.jp', NULL);
checkPublicSuffix('kyoto.jp', null);
checkPublicSuffix('test.kyoto.jp', 'test.kyoto.jp');
checkPublicSuffix('ide.kyoto.jp', NULL);
checkPublicSuffix('ide.kyoto.jp', null);
checkPublicSuffix('b.ide.kyoto.jp', 'b.ide.kyoto.jp');
checkPublicSuffix('a.b.ide.kyoto.jp', 'b.ide.kyoto.jp');
checkPublicSuffix('c.kobe.jp', NULL);
checkPublicSuffix('c.kobe.jp', null);
checkPublicSuffix('b.c.kobe.jp', 'b.c.kobe.jp');
checkPublicSuffix('a.b.c.kobe.jp', 'b.c.kobe.jp');
checkPublicSuffix('city.kobe.jp', 'city.kobe.jp');
checkPublicSuffix('www.city.kobe.jp', 'city.kobe.jp');
# TLD with a wildcard rule and exceptions.
checkPublicSuffix('om', NULL);
checkPublicSuffix('test.om', NULL);
// TLD with a wildcard rule and exceptions.
checkPublicSuffix('om', null);
checkPublicSuffix('test.om', null);
checkPublicSuffix('b.test.om', 'b.test.om');
checkPublicSuffix('a.b.test.om', 'b.test.om');
checkPublicSuffix('songfest.om', 'songfest.om');
checkPublicSuffix('www.songfest.om', 'songfest.om');
# US K12.
checkPublicSuffix('us', NULL);
// US K12.
checkPublicSuffix('us', null);
checkPublicSuffix('test.us', 'test.us');
checkPublicSuffix('www.test.us', 'test.us');
checkPublicSuffix('ak.us', NULL);
checkPublicSuffix('ak.us', null);
checkPublicSuffix('test.ak.us', 'test.ak.us');
checkPublicSuffix('www.test.ak.us', 'test.ak.us');
checkPublicSuffix('k12.ak.us', NULL);
checkPublicSuffix('k12.ak.us', null);
checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us');
checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us');

Просмотреть файл

@ -160,6 +160,7 @@ skip-if = os == "win"
[test_proxy-failover_passing.js]
[test_proxy-replace_canceled.js]
[test_proxy-replace_passing.js]
[test_psl.js]
[test_range_requests.js]
[test_readline.js]
[test_redirect-caching_canceled.js]