uBO Lite Test Page

Test filtering capabilities according to selected filtering mode, basic, optimal, or complete. Regardless of how the page is navigated to — including at browser launch — results should not be different. Requirements:

Basic network filters (DNR)

/bnf1.$script,to=…
/bnf2.$image,to=…

Advanced network filters (DNR)

/anf1.$image,redirect=32x32.png,from=…
/anf2.html$frame,csp=script-src 'none'

Specific cosmetic filters

###ccf #ccf1 .fail
###ccf #ccf2 .fail:not(.a4)
###ccf #ccf3 .fail:style(visibility: hidden)
###ccf #ccf4 .fail-pseudo::before
###ccf #ccf5 .fail-pseudo::before:style(visibility: hidden)

Procedural cosmetic filters

##.fail:has(b)
##.fail:has(> a > b)
##.fail:has(+ a > b)
##.fail:has(:is(.pass a > b))
##.fail:not(:has(c))
##.fail:has-text(needle)
##.fail:has-text(/NEEDLE/i)
##.fail:not(:has-text(haystack))
##.fail:matches-css(position: absolute)
##.fail:has(a:matches-css-before(opacity: 0))
##.fail:has(b:matches-css-after(opacity: 0))
##.fail > a > b:nth-ancestor(2)
##:xpath(.//b/../..)
##.pass > a:has(b) + .fail
##.pass > a:has(b) + .fail:has(b)
##.pass:watch-attr(class) > .fail:has(b.notok)
##.fail:has(+ a)
##.fail:has(~ a:has(b))
##.fail:remove()
##b:upward(2)
##b:upward(.fail)
##b:upward(.fail):style(visibility: hidden !important)

Scriptlet filters

##+js(set, sf1Sentinel, undefined)
##+js(nostif, sf2Sentinel)
>>##+js(set, sf3Sentinel, undefined)

Lowly generic cosmetic filters

###gcf #gcf1 .fail

Exception filters

#@##ef #gcf2 .fail
@@/bnf3\.js$/$from=…
[very long URL]

Staged tests

##+js(jsonl-edit-xhr-response, b)
##+js(jsonl-edit-fetch-response, b)
##+js(trusted-prevent-dom-bypass, Node.prototype.appendChild, Element.prototype.getElementsByTagName)

Firefox MV2 uBO-only tests

/sample.json|$xhr,replace=json:..price=0,to=…
…/test-filters.html##^#ffubo2 > script