Skip to content

Commit

Permalink
Update adblock-rs for Brave Disconnect list support
Browse files Browse the repository at this point in the history
  • Loading branch information
bbondy committed Jul 22, 2019
1 parent 0e980ee commit 2df46ba
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
41 changes: 35 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ authors = ["Brian R. Bondy <netzen@gmail.com>"]
edition = "2018"

[dependencies]
adblock="0.1.26"
adblock="~0.1.28"
libc = "0.2"
rand_os = "0.1.3"
tempfile = "~3.0.8"
memoffset = "~0.5.1"

[lib]
crate-type = [
Expand Down
9 changes: 8 additions & 1 deletion examples/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void TestThirdParty() {

void TestDefaultLists() {
std::vector<FilterList>& default_lists = FilterList::GetDefaultLists();
assert(default_lists.size() == 6);
assert(default_lists.size() == 7);
FilterList& l = default_lists[0];
assert(l.uuid == "67F880F5-7602-4042-8A3D-01481FD7437A");
assert(l.url == "https://easylist.to/easylist/easylist.txt");
Expand All @@ -243,6 +243,13 @@ void TestDefaultLists() {
assert(l.component_id.empty());
assert(l.base64_public_key.empty());
num_passed++;

// Includes Brave Disconnect list
FilterList& l2 = default_lists[6];
assert(l2.uuid == "9FA0665A-8FC0-4590-A80A-3FF6117A1258");
assert(l2.url == "https://raw.githubusercontent.com"
"/brave/adblock-lists/master/brave-disconnect.txt");
num_passed++;
}

void TestRegionalLists() {
Expand Down

0 comments on commit 2df46ba

Please sign in to comment.