Add a couple of tests for +client-header-filter{no-brotli-accepted}
[privoxy.git] / regression-tests.action
index 84d2c13..9393a0f 100644 (file)
@@ -1,6 +1,4 @@
 #############################################################################
-# $Id: regression-tests.action,v 1.59 2014/11/20 15:29:57 fabiankeil Exp $
-#############################################################################
 #
 # This is a configuration file for Privoxy-Regression-Test
 # (included in the source tarball's tools directory).
@@ -10,7 +8,7 @@
 #
 #############################################################################
 #
-# Copyright (c) 2007-2014 Fabian Keil <fk@fabiankeil.de>
+# Copyright (c) 2007-2020 Fabian Keil <fk@fabiankeil.de>
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -27,7 +25,7 @@
 #############################################################################
 
 {{settings}}
-for-privoxy-version=3.0.22
+for-privoxy-version=3.0.27
 
 # Some dependencies Privoxy-Regression-Test should know about:
 #
@@ -43,10 +41,12 @@ for-privoxy-version=3.0.22
 # Level 17 needs = feature status FEATURE_64_BIT_TIME_T Yes
 # Level 18 needs = feature status FEATURE_GRACEFUL_TERMINATION No
 # Level 19 needs = feature status FEATURE_GRACEFUL_TERMINATION Yes
-# Level 20 needs = feature status FEATURE_TOGGLE Yes
-# Level 21 needs = feature status FEATURE_TOGGLE No
+# Level 20 needs = config line enable-remote-toggle\s+1
+# Level 21 needs = config line enable-remote-toggle\s+0
 # Level 22 needs = config line enable-proxy-authentication-forwarding\s+0
 # Level 23 needs = config line enable-proxy-authentication-forwarding\s+1
+# Level 24 needs = feature status FEATURE_CLIENT_TAGS Yes
+# Level 25 needs = feature status FEATURE_HTTPS_INSPECTION No
 
 #######################################################
 # Enable taggers to activate the tests on demand
@@ -210,6 +210,28 @@ TAG:^add-header\{X-Custom-Header: yes, please\}$
 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
 TAG:^client-header-filter\{hide-tor-exit-notation\}$
 
+#######################################################
+# Test client-header-filter{no-brotli-accepted}.
+#######################################################
+
+{+client-header-filter{no-brotli-accepted}}
+# Set Header    = Accept-Encoding: gzip, deflate, br
+# Expect Header = Accept-Encoding: gzip, deflate
+#
+# Set Header    = Accept-Encoding: gzip, br, deflate
+# Expect Header = Accept-Encoding: gzip, deflate
+#
+# Set Header    = Accept-Encoding: br, gzip, deflate
+# Expect Header = Accept-Encoding: gzip, deflate
+#
+# Set Header    = Accept-Encoding: br
+# Expect Header = Accept-Encoding:
+#
+# Set Header    = Accept-Encoding: gzip, deflate
+# Expect Header = NO CHANGE
+#
+TAG:^client-header-filter\{no-brotli-accepted\}$
+
 #######################################################
 # Test crunch-client-header{}.
 #######################################################
@@ -329,6 +351,7 @@ TAG:^hide-if-modified-since\{-60\}$
 # Expect Header = SOME CHANGE
 # Set Header    = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
 # Expect Header = SOME CHANGE
+# Level = 17
 TAG:^hide-if-modified-since\{\+60\}$
 
 {+hide-if-modified-since{60} -crunch-if-none-match}
@@ -677,7 +700,7 @@ TAG:^Proxy-Authorization header forwarding$
 #
 # These are mainly useful for checking for memory leaks
 # with Valgrind or whether or not the user manual is installed
-# correctly and are unlikely to actually detect any
+# correctly.
 #
 # Note that if "Expect Status Code" is missing, 200 is implied.
 #
@@ -703,6 +726,7 @@ TAG:^Proxy-Authorization header forwarding$
 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
 # Fetch Test = http://config.privoxy.org/show-status?file=trust
 # Fetch Test = http://p.p/show-version
+# Expect Status Code = 404
 # Fetch Test = http://p.p/show-request
 # Fetch Test = http://p.p/show-url-info
 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
@@ -718,59 +742,91 @@ TAG:^Proxy-Authorization header forwarding$
 # Fetch Test = http://p.p/toggle
 # Level = 20
 # Fetch Test = http://p.p/toggle
-# Expect Status Code = 404
+# Expect Status Code = 403
 # Level = 21
 # Fetch Test = http://p.p/edit-actions
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/eaa
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/eau
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/ear
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/eal
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/eafu
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/eas
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/easa
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/easr
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/eass
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-for-url
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-list
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-submit
+# Expect Status Code = 403
 # Level = 12
+# Expect Status Code = 403
 # Fetch Test = http://p.p/edit-actions-url
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-url-form
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-add-url
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-add-url-form
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-remove-url
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-remove-url-form
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-section-add
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-section-remove
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/edit-actions-section-swap
+# Expect Status Code = 403
 # Level = 12
 # Fetch Test = http://p.p/error-favicon.ico
 # Fetch Test = http://p.p/favicon.ico
 # Fetch Test = http://p.p/robots.txt
 # Fetch Test = http://p.p/send-banner
+# Trusted CGI Request = http://p.p/send-stylesheet
 # Fetch Test = http://p.p/send-stylesheet
+# Expect Status Code = 403
 # Fetch Test = http://p.p/t
 # Fetch Test = http://p.p/url-info-osd.xml
+# Fetch Test = http://p.p/client-tags
+# Level = 24
+# Trusted CGI Request = http://p.p/toggle-client-tag
+# Expect Status Code = 302
+# Level = 24
+# Fetch Test = http://p.p/toggle-client-tag
+# Expect Status Code = 403
+# Level = 24
 
 # Trusted CGI Request = http://p.p/edit-actions
 # Expect Status Code = 302
@@ -879,6 +935,7 @@ TAG:^Proxy-Authorization header forwarding$
 # Method Test = OPTIONS
 # Method Test = TRACE
 # Method Test = CONNECT
+# Level = 25
 # Method Test = PROPFIND
 # Method Test = PROPPATCH
 # Method Test = MOVE
@@ -1051,3 +1108,7 @@ redirect.example.net/
 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/&parameter1=part-of-the-redirected-url1&parameter2=part-of-the-redirected-url1
 # Redirect Destination = http://redirected.example.net/&parameter1=part-of-the-redirected-url1&parameter2=part-of-the-redirected-url1
 redirect2.example.net/
+
+{+delay-response{1}}
+# Fetch Test = http://config.privoxy.org/show-url-info?url=http%3A%2F%2Fwww.example.com%2Fprivoxy-test-delay-response
+config.privoxy.org/show-url-info\?url=http%3A%2F%2Fwww\.example\.com%2Fprivoxy-test-delay-response