Skip to content

Fix #389 - Alternate approach for onBlockableItem in MV3

Justin Wernick requested to merge 389-mv3-reporting-webrequest-only into master

This MR takes a different approach to onBlockableItem in MV3. The benefit of this approach is that it doesn't have rate limiting restrictions so testing is much faster, and it will work when service workers are suspended.

Outstanding before this is no longer a draft:

  • Get any tests skipped as unimplementedInMV3 working.
  • Remove any parts of the old approach which don't make sense anymore.
  • There are two tests that are still behaving incorrectly in the context of fuzz tests. (create an async getFrameInfo. Wait for the frames to be available)
    • logs allowlisting for contents of aborted iframe
    • logs allowlisting for nested iframe when the inner frame is set by srcdoc
  • These two tests highlight the interesting case of not knowing exactly which filter was used:
    • Mix of rewrite and blocking filters. Make sure the right one is logged. (see logs a combination of rewrite and blocking filters...) (Check for rewrite types when in "block" listener)
    • Multiple CSP filters at the same time (see logs a specific blocking $csp filter when there are two similar items) (Update the tests to reflect this state)
  • Check that consistently log filters being applied to frames. No duplicate events, no skipped events. (a new ticket was opened to deal with these)
    • logs allowlisting $document filter after cross domain navigation
    • logs allowlisting ${option} filter tests appear to be flaky
  • Update API docs for onBlockableItem with MV3-specific considerations (tabId option won't work reliably)
  • Exit early if there are no listeners
Edited by Justin Wernick

Merge request reports