Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Conversation

@johannhof
Copy link
Contributor

This takes the numbers from the document, although there are a few
flaws in the implementation on Necko side, which I will raise with
them. See tests that are currently skipped.

Basically this feature only works well if Tracking Protection is turned
on.

Copy link
Contributor

@ericawright ericawright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to actually send telemetry anymore, and the test for that is failing.

@johannhof
Copy link
Contributor Author

Which test is failing for you? The one in 1-telemetry.js or 2-trackers.js?

@ericawright
Copy link
Contributor

1-telemetry.js
screen shot 2018-08-22 at 1 04 42 pm

emitTrackersExist(tabId) {
this.emit("trackers-exist", {tabId});
emitTrackersExist(tabId, trackersFound, trackersBlocked) {
this.emit("trackers-exist", {tabId, trackersFound, trackersBlocked});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to unwrap these?

const isAllowing = state & Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT;
if (isBlocking || isAllowing) {
// There are trackers on this page.
// This information should only be stored on the top-level docshell, so we use that even in frames.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean any trackers in an iframe are missed, or they will just be saved on the top level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this was implemented as specified (which it looks like) then this will just save all blocked trackers (even from sub-frames) on the top level document.

driver = await utils.setupWebdriver.promiseSetupDriver(
utils.FIREFOX_PREFERENCES,
);
await utils.setPreference(driver, "extensions.fastblock-shield_mozilla_org.test.variationName", "TPL0");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that this has to be set, I'm getting failures. If I set it to "FB5L0" there's a failure on "correctly records performance metrics"
on "Control" there's a failure on "has recorded one ping"
Doesn't this sort of invalidate the tests?

Since this branch is needed in order to record amount of trackers on a page, couldn't we just set this before running that test in particular.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shoot, I think the errors are not your fault, I'm seeing them on master too - but only with certain branches so it's unpredictable. Sometimes I get a positive test, other failing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah for some reason https://mozilla.github.io/tracking-test/disconnect.html doesn't always get blocked in this test but seems to work fine in real life. It's a little worrying, but I suppose nothing that needs to concern us for this PR :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced it with our well-working default test site: https://itisatrap.org/firefox/its-a-tracker.html

@johannhof
Copy link
Contributor Author

johannhof commented Aug 27, 2018

So we're currently resolving the mentioned issues in https://bugzilla.mozilla.org/show_bug.cgi?id=1485400.

As I wrote in that bug, the patch seems to get the right behavior when testing with framescripts but that didn't seem to translate to the Shield study in my testing. In any case, I used a debug build and that was pretty messed up and crashy with the study anyway, so I'd like to wait and see how this behaves when we have it in Nightly.

I'm going to fix the conflicts and nits and land this.

 This takes the numbers from the document, although there are a few
 flaws in the implementation on Necko side, which I will raise with
 them. See tests that are currently skipped.

 Basically this feature only works well if Tracking Protection is turned
 on.
@johannhof
Copy link
Contributor Author

@ericawright do you think this is good to merge?

@ericawright ericawright merged commit e9b0473 into master Aug 27, 2018
@ericawright ericawright deleted the trackers branch August 29, 2018 23:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants