Closed Bug 1633340 Opened 3 years ago Closed 3 years ago

Make the test framework of ETP Fission-Compatible


(Core :: Privacy: Anti-Tracking, task, P2)




Fission Milestone M4.1
Tracking Status
firefox78 --- fixed


(Reporter: timhuang, Assigned: timhuang)




(8 files)

There are some places in the ETP's test framwork are not fission-compatible. For example, we open a window from a cross-origin content window, which is not allowed in Fission. Maybe there are more of them, we should fix them.

Depends on: 1633851

Tracking for Fission's M4.1 Mochitest milestone.

Severity: -- → normal
Fission Milestone: --- → M4.1
Depends on: 1635261
Blocks: 1599278
Depends on: 1639149

There are two places where we will hit the assertion during the test. It
won't stop the test, but might bring unforeseeable problems in the

There are two assertions, one is that we don't read the channel when we
use a channel to detect if a third party page is a tracker. The another
one is that we directly open window from the chrome window. This patch
fixes these issues.

When we do the accessRemoval test for the top-frame navigation, we first
add an iframe through the test script and then do the naviagtion. After
the browser has been navigated back, it will access the same iframe to
see if the storage access is removed. This works for non-Fission mode.
But, it wont work for Fission.

In Fission, the iframe added by the script won't exist after navigating
back. So, we cannot use the same iframe to do the test. In order to
address this, we change the test to create a new iframe instead and do
the test in it.

Depends on D75976

The old SpecialPowers.Services.perms.testPermissionFromPrincipal() would
only test the permission in the content process. But we won't sync the
stoarge permission to the tracker's process since it is under the
top-level principal. In order to resolve this, we change to use
SpecialPowers.testPermission() which asynchronously test permission in
the parent process. Through it, we can make waiting permissions

Depends on D75977

Due to the fact the the same domain with different schemes would be
consider as third-party in Fission. So, we have to use the same scheme
when doing the test in Fission. This patch change
TEST_ANOTHER_3RD_PARTY_DOMAIN to http scheme in Fission mode. In
non-Fission mode, it will still use https scheme.

Depends on D75978

The ETP test needs a longer running time in Fission. We make it longer
in this patch.

Depends on D75979

Sometimes we check the console log before the content blocking log
has appeared on the console in Fission. This patch makes the test
framework to explicitly wait the content blocking log.

Depends on D75980

Pushed by
Part 1: Resolve assertion issues for the ETP test framework. r=baku
Part 2: Make opening window in iframe for antitracking test framework fission-compatible. r=baku
Part 3: Make DynamicFPIHelper and StoragePrincipalHelper Fission compatible. r=baku
Part 4: Change the way how we do accessRemoval test for the 'navigate-topframe'. r=baku
Part 5: Use a Fission compatible API to wait permissions in storageAccessAPIHelpers.js. r=baku
Part 6: Use the 'http' scheme for TEST_ANOTHER_3RD_PARTY_DOMAIN in ETP test for Fission. r=baku
Part 7: Request even longer timeout for ETP tests in Fission. r=baku
Part 8: Explicitly wait the console message before get the console log. r=baku
You need to log in before you can comment on or make changes to this bug.