From f33bf4e7f8ba00839f088e0807d71b2e76e5f24e Mon Sep 17 00:00:00 2001 From: Masatoshi Kimura Date: Fri, 24 Aug 2012 14:03:15 +0100 Subject: [PATCH] Bug 779845 - Incorporate the PSL test into our test system. r=bsmith. --- netwerk/test/unit/data/test_psl.txt | 78 ++++++++++++++--------------- netwerk/test/unit/xpcshell.ini | 1 + 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/netwerk/test/unit/data/test_psl.txt b/netwerk/test/unit/data/test_psl.txt index 63b696afd807..5a758317b598 100644 --- a/netwerk/test/unit/data/test_psl.txt +++ b/netwerk/test/unit/data/test_psl.txt @@ -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'); diff --git a/netwerk/test/unit/xpcshell.ini b/netwerk/test/unit/xpcshell.ini index c83320496e0b..32e8870193d9 100644 --- a/netwerk/test/unit/xpcshell.ini +++ b/netwerk/test/unit/xpcshell.ini @@ -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]