summaryrefslogtreecommitdiffstats
path: root/chrome/test/data
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 16:22:14 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 16:22:14 +0000
commitc37f8b42ae69eb7070f46c0be0791c0c67bf2163 (patch)
tree2f1a33c964833b2a2b78b9defe8d76b58ebedcc5 /chrome/test/data
parentd63bfa7d4c4ed7a928c4a9cef41847fef8e29109 (diff)
downloadchromium_src-c37f8b42ae69eb7070f46c0be0791c0c67bf2163.zip
chromium_src-c37f8b42ae69eb7070f46c0be0791c0c67bf2163.tar.gz
chromium_src-c37f8b42ae69eb7070f46c0be0791c0c67bf2163.tar.bz2
Load filter rules from preferences.
BUG=32782 TEST=unit_tests Review URL: http://codereview.chromium.org/555033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r--chrome/test/data/blacklist_samples/annoying_ads.pbl12
-rw-r--r--chrome/test/data/blacklist_samples/block_flash.pbl5
-rw-r--r--chrome/test/data/blacklist_samples/combine3.pbrbin305 -> 0 bytes
-rw-r--r--chrome/test/data/blacklist_samples/host.pbl6
-rw-r--r--chrome/test/data/blacklist_samples/other_ads.pbl6
-rw-r--r--chrome/test/data/blacklist_samples/session_cookies.pbl6
-rw-r--r--chrome/test/data/blacklist_small.pbl25
-rw-r--r--chrome/test/data/blacklist_small.pbrbin306 -> 0 bytes
-rw-r--r--chrome/test/data/profiles/blacklist_prefs/Preferences41
9 files changed, 41 insertions, 60 deletions
diff --git a/chrome/test/data/blacklist_samples/annoying_ads.pbl b/chrome/test/data/blacklist_samples/annoying_ads.pbl
deleted file mode 100644
index b9dc8d2..0000000
--- a/chrome/test/data/blacklist_samples/annoying_ads.pbl
+++ /dev/null
@@ -1,12 +0,0 @@
-[Chromium::PrivacyBlacklist]
-|Name: AnnoyingAds
-|URL: http://www.ads.tv
-
-# Block Ads by servers
-annoying.ads.tv/@ => kBlockAll
-
-# Block Ads by name
-@/annoying/120x600.jpg => kBlockAll
-
-# Block Ads by path
-@/annoying_ads/@ => kBlockAll
diff --git a/chrome/test/data/blacklist_samples/block_flash.pbl b/chrome/test/data/blacklist_samples/block_flash.pbl
deleted file mode 100644
index 2373f30..0000000
--- a/chrome/test/data/blacklist_samples/block_flash.pbl
+++ /dev/null
@@ -1,5 +0,0 @@
-[Chromium::PrivacyBlacklist]
-|Name: BlockFlash
-|URL: http://www.google.com
-
-@ => kBlockByType(application/x-shockwave-flash)
diff --git a/chrome/test/data/blacklist_samples/combine3.pbr b/chrome/test/data/blacklist_samples/combine3.pbr
deleted file mode 100644
index 30ef556..0000000
--- a/chrome/test/data/blacklist_samples/combine3.pbr
+++ /dev/null
Binary files differ
diff --git a/chrome/test/data/blacklist_samples/host.pbl b/chrome/test/data/blacklist_samples/host.pbl
deleted file mode 100644
index 16ce85d..0000000
--- a/chrome/test/data/blacklist_samples/host.pbl
+++ /dev/null
@@ -1,6 +0,0 @@
-[Chromium::PrivacyBlacklist]
-|Name: Host
-|URL: http://www.example.com
-
-# Block entire host.
-host/@ => kBlockAll
diff --git a/chrome/test/data/blacklist_samples/other_ads.pbl b/chrome/test/data/blacklist_samples/other_ads.pbl
deleted file mode 100644
index 3e888c0..0000000
--- a/chrome/test/data/blacklist_samples/other_ads.pbl
+++ /dev/null
@@ -1,6 +0,0 @@
-[Chromium::PrivacyBlacklist]
-|Name: OtherAds
-|URL: http://www.ads.tv
-
-# Block Ads by path
-@/other_ads/@ => kBlockAll
diff --git a/chrome/test/data/blacklist_samples/session_cookies.pbl b/chrome/test/data/blacklist_samples/session_cookies.pbl
deleted file mode 100644
index f83727b..0000000
--- a/chrome/test/data/blacklist_samples/session_cookies.pbl
+++ /dev/null
@@ -1,6 +0,0 @@
-[Chromium::PrivacyBlacklist]
-|Name: SessionCookies
-|URL: http://www.google.com
-
-# Block all Flash media everywhere.
-@ => kDontPersistCookies
diff --git a/chrome/test/data/blacklist_small.pbl b/chrome/test/data/blacklist_small.pbl
deleted file mode 100644
index 61f2665..0000000
--- a/chrome/test/data/blacklist_small.pbl
+++ /dev/null
@@ -1,25 +0,0 @@
-[Chromium::PrivacyBlacklist]
-|Name: Sample
-|URL: http://www.google.com Text here is ignored
-|Icon: Unsupported feature !!!!!
-
-# Affect an entire site
-@poor-security-site.com => kBlockUnsecure
-
-# Affect subdomains of an entire site
-@.ad-serving-place.com => kBlockCookies
-
-# Affect site files under a subfolder
-www.site.com/anonymous/folder/@ => kDontSendUserAgent, kDontSendReferrer
-
-# Affect a specific URL
-www.site.com/bad/url => kBlockAll
-
-# Affect queries to a specific script
-@/script?@ => kBlockAll
-
-# Affect queries with a specific parameter
-@?badparam@ => kBlockAll
-
-# Whitelist a specific URL
--www.site.com/bad/url/good => kBlockAll
diff --git a/chrome/test/data/blacklist_small.pbr b/chrome/test/data/blacklist_small.pbr
deleted file mode 100644
index 114d0ba..0000000
--- a/chrome/test/data/blacklist_small.pbr
+++ /dev/null
Binary files differ
diff --git a/chrome/test/data/profiles/blacklist_prefs/Preferences b/chrome/test/data/profiles/blacklist_prefs/Preferences
new file mode 100644
index 0000000..e63e8c3
--- /dev/null
+++ b/chrome/test/data/profiles/blacklist_prefs/Preferences
@@ -0,0 +1,41 @@
+{
+ "profile": {
+ "privacy_filter_rules": {
+ "provider1": {
+ "name": "Sample",
+ "url": "http://www.example.com",
+ "entries": [
+ {
+ "pattern": "@poor-security-site.com",
+ "attributes": 16,
+ "exception": false
+ }, {
+ "pattern": "@.ad-serving-place.com",
+ "attributes": 2,
+ "exception": false
+ }, {
+ "pattern": "www.site.com/anonymous/folder/@",
+ "attributes": 12,
+ "exception": false
+ }, {
+ "pattern": "www.site.com/bad/url",
+ "attributes": 1,
+ "exception": false
+ }, {
+ "pattern": "@/script?@",
+ "attributes": 1,
+ "exception": false
+ }, {
+ "pattern": "@?badparam@",
+ "attributes": 1,
+ "exception": false
+ }, {
+ "pattern": "www.site.com/bad/url/good",
+ "attributes": 1,
+ "exception": true
+ }
+ ]
+ }
+ }
+ }
+}