More inclusive icon search for unpack tests; bug 631095

This commit is contained in:
mattbasta 2011-02-02 09:09:52 -05:00
Родитель abb089d969
Коммит 87862738c9
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -39,7 +39,7 @@ def test_no_unpack_dict():
def test_no_unpacked_ico():
"Packages containing ICO files and unpack is unset/false should fail."
assert _do_test(contents=("foo.ico", )).failed()
assert _do_test(contents=("chrome/icons/default/foo.png", )).failed()
def test_no_unpacked_exec_safe():
"""Packages containing executable files outside the /components/ directory

Просмотреть файл

@ -141,7 +141,7 @@ def test_emunpack(err, package_contents, xpi_package):
executables = ("exe","dll","so","dylib","exe","bin")
# Search for unpack-worthy files
for file_ in package_contents:
if fnmatch.fnmatch(file_, "*.ico"):
if fnmatch.fnmatch(file_, "chrome/icons/default/*"):
fails = True
break
# Executables in /components/ should also be flagged.