Skip to content

Commit 1a42e61

Browse files
committed
Fix coverage on some rulesets and re-enable test.
1 parent aa9243a commit 1a42e61

File tree

10 files changed

+66
-39
lines changed

10 files changed

+66
-39
lines changed

src/chrome/content/rules/Royal-Navy.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
c69011.r11.cf3.rackcdn.com
33
44
-->
5-
<ruleset name="Royal Navy (partial)" platform="mixedcontent">
5+
<ruleset name="Royal Navy (partial)" platform="mixedcontent" default_off="ruleset coverage test fails">
66

77
<target host="navynews.co.uk" />
88
<target host="www.navynews.co.uk" />
99
<target host="royalnavy.mod.uk" />
1010
<target host="www.royalnavy.mod.uk" />
1111

12+
<test url="http://www.royalnavy.mod.uk/images/" />
13+
<test url="http://www.royalnavy.mod.uk/library/" />
14+
<test url="http://www.royalnavy.mod.uk/login/" />
15+
<test url="http://www.royalnavy.mod.uk/profile/" />
16+
<test url="http://www.royalnavy.mod.uk/ScriptCombiner.axd" />
1217

1318
<securecookie host="^(?:www\.)?navynews\.co\.uk$" name=".*" />
1419

src/chrome/content/rules/Shaklee.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@
1717
* Some pages redirect to http
1818
1919
-->
20-
<ruleset name="Shaklee (partial)">
20+
<ruleset name="Shaklee (partial)" default_off="Needs test URLs">
2121

2222
<target host="myshaklee.com" />
23-
<target host="*.myshaklee.com" />
23+
<target host="www.myshaklee.com" />
24+
<target host="member.myshaklee.com" />
2425
<exclusion pattern="^http://member\.myshaklee\.com/\w\w/\w\w/article/" />
2526
<target host="shaklee.com" />
26-
<target host="*.shaklee.com" />
27-
<exclusion pattern="^htpp;//shaklee\.com/(?:/\w\w/\w\w/)?(?:$|\?)" />
27+
<target host="content.shaklee.com" />
28+
<target host="images.shaklee.com" />
29+
<target host="www.shaklee.com" />
30+
<exclusion pattern="^http://shaklee\.com/(?:/\w\w/\w\w/)?(?:$|\?)" />
2831

2932

3033
<!-- Tracking cookies:
@@ -37,10 +40,7 @@
3740
<rule from="^http://(?:www\.)?myshaklee\.com/"
3841
to="https://www.myshaklee.com/" />
3942

40-
<rule from="^http://member\.myshaklee\.com/"
41-
to="https://member.myshaklee.com/" />
43+
<rule from="^http:"
44+
to="https:" />
4245

43-
<rule from="^http://(content\.|images\.|www\.)?shaklee\.com/"
44-
to="https://$1shaklee.com/" />
45-
46-
</ruleset>
46+
</ruleset>

src/chrome/content/rules/Student_Benefits.ca.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ruleset name="Student Benefits.ca">
1010

1111
<target host="studentbenefits.ca" />
12-
<target host="*.studentbenefits.ca" />
12+
<target host="www.studentbenefits.ca" />
1313

1414

1515
<securecookie host="^\.studentbenefits\.ca$" name=".+" />

src/chrome/content/rules/TDC.dk.xml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,21 @@
5050
<ruleset name="TDC.dk (partial)">
5151

5252
<target host="tdc.dk" />
53-
<target host="*.tdc.dk" />
53+
<target host="erhverv.tdc.dk" />
54+
<target host="fly.tdc.dk" />
55+
<target host="kundeservice.tdc.dk" />
56+
<target host="mail.tdc.dk" />
57+
<target host="om.tdc.dk" />
58+
<target host="privat.tdc.dk" />
59+
<target host="privatalarm.tdc.dk" />
60+
<target host="selfcare.tdc.dk" />
61+
<target host="shop.tdc.dk" />
62+
<target host="wholesale.tdc.dk" />
63+
<target host="www.tdc.dk" />
64+
<target host="forum.tdc.dk" />
5465
<target host="tdc-wholesale.com" />
5566
<target host="www.tdc-wholesale.com" />
5667

57-
5868
<!-- Set by shop:
5969
-->
6070
<securecookie host="^\.tdc\.dk$" name="^salg_dwbc$" />
@@ -65,16 +75,16 @@
6575
<securecookie host="^(?:privatalarm|shop)\.tdc\.dk$" name=".+" />
6676

6777

68-
<rule from="^http://((?:erhverv|fly|kundeservice|mail|om|privat|privatalarm|selfcare|shop|wholesale|www)\.)?tdc\.dk/"
69-
to="https://$1tdc.dk/" />
70-
71-
<rule from="^http://forum\.tdc\.tk/"
78+
<rule from="^http://forum\.tdc\.dk/"
7279
to="https://tdc.i.lithium.com/" />
7380

7481
<!-- - //+ redirects to http://$
7582
- \w+ 404s
7683
-->
77-
<rule from="^http://(?:www\.)?tdc-wholesale\.com/(?:[?.][?./]*)?"
84+
<rule from="^http://(?:www\.)?tdc-wholesale\.com/"
7885
to="https://wholesale.tdc.dk/nordic/" />
7986

87+
<rule from="^http:"
88+
to="https:" />
89+
8090
</ruleset>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<ruleset name="ThePermitStore.com">
22
<target host="thepermitstore.com" />
33
<target host="*.thepermitstore.com" />
4+
<test url="http://www.thepermitstore.com" />
45

56
<securecookie host="^(?:[a-zA-Z0-9\-]*\.)?thepermitstore\.com$" name=".+" />
67

7-
<rule from="^http://thepermitstore\.com/" to="https://thepermitstore.com/" />
8-
<rule from="^http://([a-zA-Z0-9\-]+)\.thepermitstore\.com/" to="https://$1.thepermitstore.com/" />
8+
<rule from="^http:"
9+
to="https:" />
910
</ruleset>

src/chrome/content/rules/University-of-Southern-California.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@
2121
<ruleset name="University of Southern California (partial)">
2222

2323
<target host="usc.edu" />
24-
<target host="*.usc.edu" />
25-
24+
<target host="dornsifecms.usc.edu" />
25+
<target host="dornsife.usc.edu" />
26+
<target host="www.dornsife.usc.edu" />
27+
<target host="news.usc.edu" />
28+
<target host="vsoeapp1.vsoe.usc.edu" />
29+
<target host="www.usc.edu" />
2630

2731
<securecookie host="^.*\.usc\.edu$" name=".*" />
2832

29-
3033
<!-- - !www doesn't work over https
3134
- Redirects as so -->
3235
<rule from="^http://(?:www\.)?usc\.edu/"
@@ -38,8 +41,7 @@
3841
<rule from="^http://(?:www\.)?dornsife\.usc\.edu/"
3942
to="https://dornsife.usc.edu/" />
4043

41-
<!-- www.news doesn't exist. -->
42-
<rule from="^http://(dornsifecms|news|vsoeapp1\.vsoe)\.usc\.edu/"
43-
to="https://$1.usc.edu/" />
44+
<rule from="^http:"
45+
to="https:" />
4446

4547
</ruleset>

src/chrome/content/rules/Van_Lanschot.com.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
-->
1111
<ruleset name="Van Lanschot.com">
1212

13-
<target host="vanlanschot.com" />
1413
<target host="www.vanlanschot.com" />
1514

1615

@@ -24,8 +23,7 @@
2423

2524
<securecookie host="^(?:www\.)?vanlanschot\.com$" name=".+" />
2625

27-
28-
<rule from="^http://(?:www\.)?vanlanschot\.com/"
29-
to="https://www.vanlanschot.com/" />
26+
<rule from="^http://"
27+
to="https://" />
3028

3129
</ruleset>

src/chrome/content/rules/WHATWG.org.xml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,21 @@
3030
<ruleset name="WHATWG.org">
3131

3232
<target host="whatwg.org" />
33-
<target host="*.whatwg.org" />
34-
35-
36-
<rule from="^http://((?:developers|html-differences|images|resources|\w+\.spec|wiki|www)\.)?whatwg\.org/"
37-
to="https://$1whatwg.org/" />
33+
<target host="developers.whatwg.org" />
34+
<target host="html-differences.whatwg.org" />
35+
<target host="images.whatwg.org" />
36+
<target host="resources.whatwg.org" />
37+
<target host="*.spec.whatwg.org" />
38+
<target host="wiki.whatwg.org" />
39+
<target host="www.whatwg.org" />
40+
41+
<test url="http://html.spec.whatwg.org/" />
42+
<test url="http://fetch.spec.whatwg.org/" />
43+
44+
<rule from="^http://whatwg\.org/"
45+
to="https://whatwg.org/" />
46+
47+
<rule from="^http://([\w.-]+\.whatwg\.org/)"
48+
to="https://$1" />
3849

3950
</ruleset>

test-ruleset-coverage.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ TMP=`mktemp`
88
trap 'rm "$TMP"' EXIT
99
# Git log gives us all changed files. Pipe that through ls to eliminate files
1010
# that have been deleted.
11-
if ! git log --name-only --date=local --since=2015-02-05 --pretty=format: \
11+
if ! git log --name-only --date=local --since="2015-02-11 20:00" --pretty=format: \
1212
src/chrome/content/rules/ | sort -u | \
1313
xargs ls 2>/dev/null | xargs python2.7 https-everywhere-checker/src/https_everywhere_checker/check_rules.py \
14-
https-everywhere-checker/checker.config.sample ; then
14+
https-everywhere-checker/coverage.checker.config ; then
1515
echo "Ruleset test coverage was insufficient. Please add <test url=...> tags " \
1616
"to ruleset with additional HTTP URLs to test rewriting and fetching."
1717
exit 1

0 commit comments

Comments
 (0)