Menu
Home
Blog
Add-ons
Forum
Wiki
Developers
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
dependencies
vendor
mozbrowser
locales
filter.py
Go to the documentation of this file.
1
def
test
(mod, path, entity = None):
2
import
re
3
# ignore anyhting but Firefox
4
if
mod
not
in
(
"netwerk"
,
"dom"
,
"toolkit"
,
"security/manager"
,
5
"browser"
,
"extensions/reporter"
,
"extensions/spellcheck"
,
6
"other-licenses/branding/firefox"
):
7
return
False
8
if
mod !=
"browser"
and
mod !=
"extensions/spellcheck"
:
9
# we only have exceptions for browser and extensions/spellcheck
10
return
True
11
if
not
entity:
12
if
mod ==
"extensions/spellcheck"
:
13
return
False
14
# browser
15
return
not
(re.match(
r"searchplugins\/.+\.xml"
, path)
or
16
re.match(
r"chrome\/help\/images\/[A-Za-z-_]+\.png"
, path))
17
if
mod ==
"extensions/spellcheck"
:
18
# l10n ships en-US dictionary or something, do compare
19
return
True
20
if
path ==
"defines.inc"
:
21
return
entity !=
"MOZ_LANGPACK_CONTRIBUTORS"
22
23
if
path !=
"chrome/browser-region/region.properties"
:
24
# only region.properties exceptions remain, compare all others
25
return
True
26
27
return
not
(re.match(
r"browser\.search\.order\.[1-9]"
, entity)
or
28
re.match(
r"browser\.contentHandlers\.types\.[0-5]"
, entity)
or
29
re.match(
r"gecko\.handlerService\.schemes\."
, entity)
or
30
re.match(
r"gecko\.handlerService\.defaultHandlersVersion"
, entity))
filter.test
def test
Definition:
filter.py:1