Opened 3 years ago

Closed 3 years ago

#4055 closed change (fixed)

Add unit tests for ElemHide.getSelectorsForDomain

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):

https://codereview.adblockplus.org/29342884/

Description

Background

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 ~foo.example.com,example.com##foo and rules that are overwritten by filter exceptions.

Change History (5)

comment:1 Changed 3 years ago by trev

  • Priority changed from Unknown to P2
  • Ready set

comment:2 Changed 3 years ago by kzar

  • Blocking 4057 added

comment:3 Changed 3 years ago by kzar

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 3 years ago by abpbot

A commit referencing this issue has landed:
Issue 4055 - Test ElemHide.getSelectorsFordomain

comment:5 Changed 3 years ago by kzar

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.