Closed Bug 1633340 Opened 6 months ago Closed 5 months ago

Make the test framework of ETP Fission-Compatible

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla78
Fission Milestone M4.1
Tracking Status
firefox78 --- fixed

People

(Reporter: timhuang, Assigned: timhuang)

References

Details

Attachments

(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
future.

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
fission-compatible.

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 tihuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8bea1f96f4b
Part 1: Resolve assertion issues for the ETP test framework. r=baku
https://hg.mozilla.org/integration/autoland/rev/50393ee6ebf8
Part 2: Make opening window in iframe for antitracking test framework fission-compatible. r=baku
https://hg.mozilla.org/integration/autoland/rev/d8b89c681ed0
Part 3: Make DynamicFPIHelper and StoragePrincipalHelper Fission compatible. r=baku
https://hg.mozilla.org/integration/autoland/rev/0851ca04159b
Part 4: Change the way how we do accessRemoval test for the 'navigate-topframe'. r=baku
https://hg.mozilla.org/integration/autoland/rev/e1c78a5bcd8d
Part 5: Use a Fission compatible API to wait permissions in storageAccessAPIHelpers.js. r=baku
https://hg.mozilla.org/integration/autoland/rev/ec7583769b9c
Part 6: Use the 'http' scheme for TEST_ANOTHER_3RD_PARTY_DOMAIN in ETP test for Fission. r=baku
https://hg.mozilla.org/integration/autoland/rev/51a737bb9ba7
Part 7: Request even longer timeout for ETP tests in Fission. r=baku
https://hg.mozilla.org/integration/autoland/rev/2d918365a865
Part 8: Explicitly wait the console message before get the console log. r=baku
Duplicate of this bug: 1599278
Duplicate of this bug: 1577362
Duplicate of this bug: 1578038
You need to log in before you can comment on or make changes to this bug.