Opened 4 years ago

Last modified 4 years ago

#4055 closed change

Add unit tests for ElemHide.getSelectorsForDomain — at Version 3

Reported by: kzar Assignee: kzar
Priority: P2 Milestone:
Module: Core Keywords:
Cc: trev Blocked By:
Blocking: #4057 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



adblockpluscore/lib/elemHide.js contains a function getSelectorsForDomain which is used by adblockpluschrome to apply element hiding rules to webpages. It's a performance bottleneck currently and with #235 we are looking to improve that. Unfortunately it is not a trivial function and regressions (see #4054) are easy to miss.

What to change

Add unit tests for getSelectorsForDomain. Test adding of filters, removal of filters, getSelectorsForDomain itself. Take care to test both rules that don't apply to a domain such as, and rules that are overwritten by filter exceptions.

Change History (3)

comment:1 Changed 4 years ago by trev

  • Priority changed from Unknown to P2
  • Ready set

comment:2 Changed 4 years ago by kzar

  • Blocking 4057 added

comment:3 Changed 4 years ago by kzar

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.