Add test scenario content-filters
[privoxy.git] / tests / cts / content-filters / data / test6
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 filter unsolicited-popups
7 </keywords>
8 </info>
9
10 <reply>
11 <data>
12 HTTP/1.1 200 OK\r
13 Date: Thu, 22 Jul 2010 11:22:33 GMT\r
14 Connection: close\r
15 Content-Type: text/html\r
16 X-Control: swsclose\r
17 \r
18 # Here are some strings the unsolicited-popups filter should modify:
19
20 # pcrs command 1:
21
22 <head blafasel>
23
24 # pcrs command 2:
25
26 blafasel + window.open(
27 blafasel - mapwindow.open(
28 blafasel + mapthis.open(
29 blafasel - mapparent.open(
30 blafasel + window.open(
31 blafasel = this.open(
32 blafasel = parent.open(
33
34 # pcrs command 3:
35
36 aslkdfalksjfd </html>
37 </data>
38 </reply>
39
40 <proxy-reply>
41 <data>
42 HTTP/1.1 200 OK\r
43 Date: Thu, 22 Jul 2010 11:22:33 GMT\r
44 Connection: close\r
45 Content-Type: text/html\r
46 X-Control: swsclose\r
47 Content-Length: 520\r
48 \r
49 # Here are some strings the unsolicited-popups filter should modify:
50
51 # pcrs command 1:
52
53 <head blafasel><script>function PrivoxyWindowOpen(){return(null);}</script>
54
55 # pcrs command 2:
56
57 blafasel + PrivoxyWindowOpen(
58 blafasel - PrivoxyWindowOpen(
59 blafasel + PrivoxyWindowOpen(
60 blafasel - PrivoxyWindowOpen(
61 blafasel + PrivoxyWindowOpen(
62 blafasel = PrivoxyWindowOpen(
63 blafasel = PrivoxyWindowOpen(
64
65 # pcrs command 3:
66
67 aslkdfalksjfd </html><script>function PrivoxyWindowOpen(a, b, c){return(window.open(a, b, c));}</script>
68 </data>
69 </proxy-reply>
70
71
72 <client>
73 <server>
74 http
75 </server>
76 <name>
77 +filter{unsolicited-popups}
78 </name>
79 <features>
80 proxy
81 </features>
82 <command>
83 http://%HOSTIP:%HTTPPORT/unsolicited-popups/%TESTNUMBER
84 </command>
85 </client>
86
87 <verify>
88 <protocol>
89 GET /unsolicited-popups/%TESTNUMBER HTTP/1.1\r
90 Host: %HOSTIP:%HTTPPORT\r
91 User-Agent: curl/%VERSION\r
92 Accept: */*\r
93 Connection: close\r
94 \r
95 </protocol>
96 </verify>
97 </testcase>