Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Brave fails tests on simple-adblock.com #6788

Closed
jonathansampson opened this issue Jan 20, 2017 · 8 comments
Closed

Brave fails tests on simple-adblock.com #6788

jonathansampson opened this issue Jan 20, 2017 · 8 comments

Comments

@jonathansampson
Copy link
Collaborator

jonathansampson commented Jan 20, 2017

image

@lukemulks
Copy link
Collaborator

I'm just skimming this now, but we're blocking the Google Analytics call that is made here (sending empty url resulting in a 307 redirect that fails).

Kind of a funky test for Brave, because we don't element-hide as it has perf negatives, so the rt side of the test applies less in our use-case. IMO

The "testing adblocking" test on the left is kind of weird too, the test is site-served via iframe from this URL:

http://simple-adblock.com/adblocktest/adblocktest.htm

Which seems like a not-so-genuine way to test an adblocker, unless you're the one that owns the adblocker, and want every other blocker except your own to fail the test. When I see who owns this blocker, I'm not surprised in the slightest that this test is setup this way.

I'm also not seeing any 3rd party ad requests aside from the Google Translate call, which seems like more of a webcompat item than ad blocking:
Request URL:http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit

I'd suggest we apply a site-hack for this iframe URL request to resolve w/minimal friction:
http://simple-adblock.com/adblocktest/adblocktest.htm

Can def assist further as needed.

@lukemulks lukemulks self-assigned this Feb 2, 2017
@lukemulks lukemulks added this to the 0.13.3 milestone Feb 2, 2017
@lukemulks lukemulks modified the milestones: 0.13.4, 0.13.5 Feb 15, 2017
@lukemulks
Copy link
Collaborator

lukemulks commented Mar 13, 2017

Confirming that brave/adblock-lists custom filtering rules will not work to resolve this.

The subdocument is 1p hosted, which loads in the element-block and element-hide tests into this iframe: http://simple-adblock.com/adblocktest/adblocktest.htm

If we can a siteHack for the simple-adblock.com domain to block the URL above, it should resolve the issue.

@jonathansampson
Copy link
Collaborator Author

jonathansampson commented Mar 14, 2017

@lukemulks Looks like they block based on a CSS selector:

simple-adblock.com
ELEMHIDE
##.AD_300x250
EasyList
 
simple-adblock.com
ELEMHIDE
##.Ad_300x250
EasyList
 
simple-adblock.com
ELEMHIDE
##.ad_300x250
EasyList

@lukemulks
Copy link
Collaborator

@jonathansampson You're right about that.

I also was kind of short-cutting the fix here, because their testing method is pretty weak. This simulation is great if you own this blocker - otherwise, meh, the other blockers have to subscribe to the same rules, or are branded as non-functional. I could see this method being legit if they actually were serving ads from an ad server to test, but serving the test from the same domain is kind of like cheating in my opinion.

In addition to the CSS selector blocking that you pointed out, they're applying a simple /adbanner. string blocking rule that we're not covering (we'll only cover 3rd party ad requests - though this may change due to some recent discoveries).

I probably was being a little short-sighted with the fix on this, but since we don't block by CSS selection, and since we don't block 1p url requests, I was leaning toward a fix that cut the legs out from under the test.

So there are basically 2 options here:

  • Option 1: we block the iframe source for the test, which would produce the effect that blocking would actually reflect in the wild (this is why I initially suggested that route).

  • Option 2: we set a string replacement override for the red images, to swap with the image names for the green OK messages.

WDYT? Part of me thinks Option 1 is a little more badass since it snips from a higher level, but another part of me thinks a replacement/emulation is a more apples:apples result.

@jonathansampson
Copy link
Collaborator Author

@lukemulks I think you're right; this test doesn't reflect the web. Blocking the iframe source is appropriate IMHO. If we wanted to block the elements, we can do that too. We've started doing some basic selector-based hiding via the Brave manifest. We could make an entry for this domain, or apply a more global rule.

@alexwykoff alexwykoff mentioned this issue Mar 14, 2017
44 tasks
@bbondy bbondy modified the milestones: 0.14.2, 0.14.0 Mar 16, 2017
@bbondy
Copy link
Member

bbondy commented Mar 21, 2017

Pls avoid any fix that is only getting the test to pass in a specific way.

@bbondy
Copy link
Member

bbondy commented Mar 21, 2017

Also I think we don't need to prioritize this in a milestone unless there's some generic things to learn about why we aren't blocking correctly. Unless there's big external pressure for it by many.

@jonathansampson
Copy link
Collaborator Author

@bbondy SGTM

@bbondy bbondy removed this from the 0.15.1 milestone Apr 17, 2017
@lukemulks lukemulks removed their assignment Jun 19, 2017
@bsclifton bsclifton added this to the Triage Backlog milestone Nov 27, 2017
@bsclifton bsclifton added the stale label Oct 1, 2018
@bsclifton bsclifton removed this from the Triage Backlog milestone Oct 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants