1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Add test cases to static filtering checklist

This commit is contained in:
Raymond Hill 2020-07-17 10:16:40 -04:00
parent 3789259fc9
commit 6516834051
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -17,6 +17,13 @@
!----------------------- !-----------------------
! Parsing should succeed ! Parsing should succeed
!----------------------- !-----------------------
! valid patterns
a*
|*
||*
! valid options
$script,redirect=noop.js $script,redirect=noop.js
*$empty *$empty
*$xhr,empty *$xhr,empty
@ -35,6 +42,15 @@ $script,redirect=noop.js
! Parsing should fail ! Parsing should fail
!-------------------- !--------------------
! bad patterns
a
|
||
$
! bad regex
/(abc|def/$xhr
! can't redirect without type (except to `empty`) ! can't redirect without type (except to `empty`)
*$redirect=noop.js *$redirect=noop.js
@ -51,9 +67,6 @@ $script,redirect=noop.js
*$csp=default-src 'none',ghide *$csp=default-src 'none',ghide
*$csp=default-src 'none',csp=script-src 'none' *$csp=default-src 'none',csp=script-src 'none'
! bad regex
/(abc|def/$xhr
! https://github.com/gorhill/uBlock/issues/2385#issuecomment-494078763 ! https://github.com/gorhill/uBlock/issues/2385#issuecomment-494078763
*$~document *$~document
*$~popup *$~popup