Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #233, removed built-in extensions #754

Merged
merged 7 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions automation/DeployBrowsers/configure_firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,67 +41,6 @@ def privacy(browser_params, fp, fo, root_dir, browser_profile_path):
"https://github.com/citp/OpenWPM/issues/101"
)

# AbBlock Plus
if browser_params["adblock-plus"]:
raise RuntimeError(
"AdBlock Plus is not currently supported. See: "
"https://github.com/citp/OpenWPM/issues/35"
)

# Ghostery
# Updated: 2017-10-7
if browser_params["ghostery"]:
fp.add_extension(
extension=os.path.join(
root_dir, "firefox_extensions", "ghostery", "ghostery-7.3.3.7.xpi"
)
)
ghostery_dir = os.path.join(storage_dir, "firefox@ghostery.com")
if not os.path.isdir(ghostery_dir):
os.mkdir(ghostery_dir)
shutil.copy(
os.path.join(root_dir, "firefox_extensions", "ghostery", "storage.js"),
ghostery_dir,
)

# Disconnect
# Updated: 2017-10-7
if browser_params["disconnect"]:
fp.add_extension(
extension=os.path.join(
root_dir, "firefox_extensions", "disconnect-5.18.21.xpi"
)
)

# Enable HTTPS Everywhere
# Updated: 2017-10-7
if browser_params["https-everywhere"]:
fp.add_extension(
extension=os.path.join(
root_dir, "firefox_extensions", "https_everywhere-2017.10.4.xpi"
)
)

# uBlock Origin
# Updated: 2017-10-7
# Uses the default blocklists that ship with the XPI.
if browser_params["ublock-origin"]:
fp.add_extension(
extension=os.path.join(
root_dir,
"firefox_extensions",
"ublock_origin",
"ublock_origin-1.14.10.xpi",
)
)
ublock_dir = os.path.join(storage_dir, "uBlock0@raymondhill.net")
if not os.path.isdir(ublock_dir):
os.mkdir(ublock_dir)
shutil.copy(
os.path.join(root_dir, "firefox_extensions", "ublock_origin", "storage.js"),
ublock_dir,
)


def optimize_prefs(fo):
"""
Expand Down
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
7 changes: 0 additions & 7 deletions automation/default_browser_params.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"save_content": false,
"callstack_instrument": false,
"dns_instrument": false,

"random_attributes": false,
"bot_mitigation": false,
"seed_tar": null,
Expand All @@ -17,13 +16,7 @@
"display_mode": "native",
"browser": "firefox",
"prefs": {},

"tp_cookies": "always",
"donottrack": false,
"disconnect": false,
"ghostery": false,
"https-everywhere": false,
"adblock-plus": false,
"ublock-origin": false,
"tracking-protection": false
}
13 changes: 13 additions & 0 deletions test/test_s3_aggregator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os
import time
from collections import defaultdict

Expand Down Expand Up @@ -43,6 +44,10 @@ def get_config(self, num_browsers=1, data_dir=""):
browser_params[i]["dns_instrument"] = True
return manager_params, browser_params

@pytest.mark.skipif(
"TRAVIS" in os.environ and os.environ["TRAVIS"] == "true",
reason="Localstack fails to start on Travis",
)
def test_basic_properties(self):
TEST_SITE = "%s/s3_aggregator.html" % BASE_TEST_URL
NUM_VISITS = 2
Expand Down Expand Up @@ -86,6 +91,10 @@ def test_basic_properties(self):
config = json.loads(str(dataset.get_file(config_file[0]), "utf-8"))
assert len(config["browser_params"]) == NUM_BROWSERS

@pytest.mark.skipif(
"TRAVIS" in os.environ and os.environ["TRAVIS"] == "true",
reason="Localstack fails to start on Travis",
)
def test_commit_on_timeout(self):
TEST_SITE = "%s/s3_aggregator.html" % BASE_TEST_URL
manager_params, browser_params = self.get_config(num_browsers=1)
Expand All @@ -105,6 +114,10 @@ def test_commit_on_timeout(self):
assert TEST_SITE in requests.top_level_url.unique()
manager.close()

@pytest.mark.skipif(
"TRAVIS" in os.environ and os.environ["TRAVIS"] == "true",
reason="Localstack fails to start on Travis",
)
def test_s3_callbacks(self):
TEST_SITE = BASE_TEST_URL + "/test_pages/simple_a.html"
manager_params, browser_params = self.get_config()
Expand Down