Introduction
Introduction Statistics Contact Development Disclaimer Help
tests.c - surf-adblock - Surf adblock web extension
git clone git://git.codemadness.org/surf-adblock
Log
Files
Refs
README
LICENSE
---
tests.c (1671B)
---
1 #include "../adblock.c"
2
3 /*
4
5 TODO: add tests:
6
7 ||example.com/banner.gif will block all these addresses
8
9 http://example.com/banner.gif
10 https://example.com/banner.gif
11 http://www.example.com/banner.gif
12
13 while not blocking:
14
15 http://badexample.com/banner.gif
16 http://gooddomain.example/analyze?http://example.com/banner.gif
17
18 */
19
20 int
21 main(void)
22 {
23 int status;
24
25 init();
26
27 status = allowrequest("https://tweakers.net/", "https://tweakers…
28 printf("%d\n", status);
29
30 status = allowrequest("http://tweakers.net/", "http://tweakers.n…
31 printf("%d\n", status);
32
33 status = allowrequest("https://tweakers.net/", "https://tweakers…
34 printf("%d\n", status);
35
36 status = allowrequest("https://tweakers.net/", "https://tweakers…
37 printf("%d\n", status);
38
39 status = allowrequest("https://360ads.com/", "https://360ads.com…
40 printf("%d\n", status);
41
42 status = allowrequest("https://www.360ads.com/", "https://www.36…
43 printf("%d\n", status);
44
45 status = allowrequest("http://www.360ads.com/", "http://360ads.c…
46 printf("%d\n", status);
47
48 status = allowrequest("https://360ads.com:8000/", "https://360ad…
49 printf("%d\n", status);
50
51 status = allowrequest("https://360ads.com/", "https://360ads.com…
52 printf("%d\n", status);
53
54 status = allowrequest("https://360ads.com:8000/", "https://360ad…
55 printf("%d\n", status);
56
57 status = allowrequest("https://google.com/", "https://google.com…
58 printf("%d\n", status);
59
60 /*http://statics.360ads.com/statics/images/2016/home/t3.png*/
61
62 cleanup();
63
64 return 0;
65 }
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.