Add test scenario content-filters
[privoxy.git] / tests / cts / content-filters / data / test23
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 filter msn
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 msn filter should filter:
19
20 # pcrs command 1:
21
22 </head>
23
24 # pcrs command 2:
25
26 <div id="ads_blafasel">
27 <div id='ads_foo'>
28
29 # pcrs command 3:
30
31 <div blafasel class="sb_ads_blafasel">
32 <div blafasel class='sb_ads_foo'>
33
34 # pcrs command 4:
35
36 <a href="http://g.msn.com/blafasel\?http://www.example.org/&amp;&amp;DI=tralala"
37
38 # pcrs command 5:
39
40 <a href="http://www.example.org" gping="http://www.example/ping.cgi"
41 </data>
42 </reply>
43
44 <proxy-reply>
45 <data>
46 HTTP/1.1 200 OK\r
47 Date: Thu, 22 Jul 2010 11:22:33 GMT\r
48 Connection: close\r
49 Content-Type: text/html\r
50 X-Control: swsclose\r
51 Content-Length: 1488\r
52 \r
53 # Here are some strings the msn filter should filter:
54
55 # pcrs command 1:
56
57 <style type="text/css">
58  /* Style sheet inserted by Privoxy's msn filter. */
59  .msn_ads, #at, #ar, .mktmsg {display: none !important;}
60  #results, #b_results, .flank, .results_area_flank, .results_area_stroke,
61  #results_area, #content, .sb_tlst, .sa_cc, .sb_ph, #sw_main,
62  .content, .b_content, #sw_foot, #bf, #sw_content, #sidebar, #pag
63  {width: 99% !important; min-width: 99% !important;
64  max-width: 100% !important; /* width:100% sometimes causes horizontal scrollbars */}
65  /* Remove 'related' ads */
66  .b_ad, .b_adlabel {clear: both; display:none;}
67  /* Remove "suggestions". They are next to worthless but partly overlap with the search results */
68  .suggestion, #nys_right, #nys {clear: both; display:none;}
69  /* Remove "Related searches" at the left side of the main results.
70     They are next to worthless, too, and also are still present below the main search results */
71  #b_results > .b_ans {clear: both; display:none;}
72  #s_notf_div,
73   /* Overlay ads to enable Facebook 'likes' in search results. */
74  .sn_container {display:none !important;}
75  #content, #b_content {padding: 0px 0px 0px 0px}
76  </style>
77 </head>
78
79 # pcrs command 2:
80
81 <div class="msn_ads">
82 <div class="msn_ads">
83
84 # pcrs command 3:
85
86 <div blafasel class="msn_ads">
87 <div blafasel class="msn_ads">
88
89 # pcrs command 4:
90
91 <a href="http://www.example.org/"
92
93 # pcrs command 5:
94
95 <a href="http://www.example.org"  title="URL cleaned up by Privoxy's msn filter"
96 </data>
97 </proxy-reply>
98
99 <client>
100 <server>
101 http
102 </server>
103 <name>
104 +filter{msn}
105 </name>
106 <features>
107 proxy
108 </features>
109 <command>
110 http://%HOSTIP:%HTTPPORT/msn/%TESTNUMBER
111 </command>
112 </client>
113
114 <verify>
115 <protocol>
116 GET /msn/%TESTNUMBER HTTP/1.1\r
117 Host: %HOSTIP:%HTTPPORT\r
118 User-Agent: curl/%VERSION\r
119 Accept: */*\r
120 Connection: close\r
121 \r
122 </protocol>
123 </verify>
124 </testcase>