Incorrect result from isResourceAllowlisted for subframes
Environment
- Browser and full version: 95.0.4638.54
- Extension using this toolkit: test-mv2
- Commit hash: e1f4204e
Steps to reproduce
- Open a page with a subframe.
- Allowlist only parent frame with
$elemhide
option. - Run
EWE.filters.getAllowingFilters()
andEWE.filters.isResourceAllowlisted()
for the parent and child frame. Use respective frame's URL forisResourceAllowlisted()
. - Repeat but use
$document
option for allowlisting.
Actual behavior
- Using
$elemhide
:-
getAllowingFilters()
returns allowlisting filter for either frame. -
isResourceAllowlisted()
returnstrue
for parent frame andfalse
for child frame.
-
- Using
$document
:-
getAllowingFilters()
returns allowlisting filter for either frame. -
isResourceAllowlisted()
returnstrue
for parent frame andfalse
for child frame.
-
Expected behavior
- Using
$elemhide
:-
getAllowingFilters()
returns allowlisting filter for either frame. -
isResourceAllowlisted()
returnstrue
for either frame.
-
- Using
$document
:-
getAllowingFilters()
returns allowlisting filter for either frame. -
isResourceAllowlisted()
returnstrue
for either frame.
-
Further information
Unlike adblockpluschrome's checkAllowlisted()
function, EWE's isResourceAllowlisted()
appears to only check whether the current frame is allowlisted and doesn't go up the frame hierarchy.