Add test scenario content-filters
[privoxy.git] / tests / cts / content-filters / data / test24
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 filter blogspot
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 blogspot filter should filter:
19
20 # pcrs command 1:
21
22 </head>
23
24 # pcrs command 2:
25
26 <body blafasel>
27    <div id="space-for-ie"></div>
28
29 # pcrs command 2 does not filter these because it only hits once:
30
31    <div id="content"
32    <div id="wrap4"
33    <div id="wrapper"
34
35 # pcrs command 3:
36
37 <div style="blafasel width:30em
38
39 # pcrs command 4:
40
41 background:url("http://www.blogblog.com/roundersblafasel") tralala;
42
43 # pcrs command 5:
44
45 background:#abc url("http://www.blogblog.com/roundersblafasel") tralala;@
46
47 # pcrs command 6:
48
49 XXX: TODO
50 </data>
51 </reply>
52
53 <proxy-reply>
54 <data>
55 HTTP/1.1 200 OK\r
56 Date: Thu, 22 Jul 2010 11:22:33 GMT\r
57 Connection: close\r
58 Content-Type: text/html\r
59 X-Control: swsclose\r
60 Content-Length: 946\r
61 \r
62 # Here are some strings the blogspot filter should filter:
63
64 # pcrs command 1:
65
66 <style type="text/css">
67  /* Style sheet inserted by Privoxy's blogspot filter. */
68  #powered-by {display: none !important;}
69  #wrap4, #wrapper {margin-top: 0px }
70  #blogheader, #header {margin-top: 0.5em !important}
71  #content {width: 98% }
72  #main {width: 70% }
73  #sidebar {width: 29% }
74  .post-body {overflow: auto;}
75  .blogComments {width: 100%; overflow: auto;}
76 </style>
77 </head>
78
79 # pcrs command 2:
80
81 <body> <!-- Privoxy's blogspot filter ditched some garbage here -->
82
83 # pcrs command 2 does not filter these because it only hits once:
84
85    <div id="content"
86    <div id="wrap4"
87    <div id="wrapper"
88
89 # pcrs command 3:
90
91 <div style="blafasel width: 100%
92
93 # pcrs command 4:
94
95 /*background:url("http://www.blogblog.com/roundersblafasel") tralala;*/
96
97 # pcrs command 5:
98
99 background:#abc ;/* url("http://www.blogblog.com/roundersblafasel") tralala;*/@
100
101 # pcrs command 6:
102
103 XXX: TODO
104 </data>
105 </proxy-reply>
106
107 <client>
108 <server>
109 http
110 </server>
111 <name>
112 +filter{blogspot} XXX: incomplete test coverage
113 </name>
114 <features>
115 proxy
116 </features>
117 <command>
118 http://%HOSTIP:%HTTPPORT/blogspot/%TESTNUMBER
119 </command>
120 </client>
121
122 <verify>
123 <protocol>
124 GET /blogspot/%TESTNUMBER HTTP/1.1\r
125 Host: %HOSTIP:%HTTPPORT\r
126 User-Agent: curl/%VERSION\r
127 Accept: */*\r
128 Connection: close\r
129 \r
130 </protocol>
131 </verify>
132 </testcase>