Skip to content

Commit 5b9d93f

Browse files
lenacohenghostwords
authored andcommitted
Restore Chrome jobs to CI config in MV3
1 parent a09c974 commit 5b9d93f

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

.github/workflows/test.yml

+24
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ jobs:
4646
- job: edge-beta
4747
BROWSER: "microsoft-edge-beta"
4848
BROWSER_VERSION: "beta"
49+
- job: chrome
50+
BROWSER: "google-chrome-stable"
51+
BROWSER_VERSION: "stable"
52+
- job: chrome-beta
53+
BROWSER: "google-chrome-beta"
54+
BROWSER_VERSION: "beta"
55+
- job: chrome-dev
56+
BROWSER: "google-chrome-dev"
57+
BROWSER_VERSION: "dev"
4958
env:
5059
BROWSER: ${{ matrix.BROWSER }}
5160
name:
@@ -82,6 +91,21 @@ jobs:
8291
if: ${{ matrix.BROWSER == 'microsoft-edge-beta' }}
8392
run: ./scripts/edge_webdriver.sh
8493

94+
- name: Set up Chrome
95+
if: ${{ contains(matrix.BROWSER, 'chrome') }}
96+
uses: browser-actions/setup-chrome@v1
97+
with:
98+
chrome-version: ${{ matrix.BROWSER_VERSION }}
99+
install-chromedriver: true
100+
id: setup-chrome
101+
102+
# fix ChromeDriver failure due to existing Chrome installation:
103+
# "This version of ChromeDriver only supports Chrome version XX"
104+
- name: Work around browser-actions/setup-chrome bug
105+
if: ${{ contains(matrix.BROWSER, 'chrome') }}
106+
run: |
107+
sudo ln -s ${{ steps.setup-chrome.outputs.chrome-path }} /usr/local/bin/${{ matrix.BROWSER }}
108+
85109
- name: Install Xvfb
86110
run: sudo apt-get install -y xvfb
87111

tests/selenium/content_filtering_test.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def test_cookieblocking_base_overwrites_subdomain_block(self):
109109
self.load_url(self.FIXTURE_URL + '?alt3p')
110110
self.assert_load()
111111

112-
@pytest.mark.flaky(reruns=3, condition=pbtest.shim.browser_type == "edge")
112+
@pytest.mark.flaky(reruns=5)
113113
def test_blocking_fp_script_served_from_cookieblocked_cdn(self):
114114
"""Since we have a surrogate script for FingerprintJS served from
115115
cdn.jsdelivr.net, we need to test surrogation rather than blocking."""
@@ -362,6 +362,7 @@ def test_reenabling_dnt_policy_checking(self):
362362
self.load_url(self.FIXTURE_URL)
363363
self.assert_load()
364364

365+
@pytest.mark.flaky(reruns=3)
365366
def test_removing_dnt(self):
366367
self.block_domain(self.THIRD_PARTY_DOMAIN)
367368
self.set_dnt(self.THIRD_PARTY_DOMAIN)

tests/selenium/pbtest.py

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
BROWSER_TYPES = ['chrome', 'firefox', 'edge']
3939
BROWSER_NAMES = ['google-chrome', 'google-chrome-stable', 'google-chrome-beta',
40+
'google-chrome-dev', 'google-chrome-unstable',
4041
'firefox', 'microsoft-edge', 'microsoft-edge-beta']
4142

4243

0 commit comments

Comments
 (0)