def test_inner_package(err, xpi_package, for_appversions=None):
    "Tests a package's inner content."
    populate_chrome_manifest(err, xpi_package)
    for tier in sorted(decorator.get_tiers()):
        err.set_tier(tier)
        for test in decorator.get_tests(tier, err.detected_type):
            if (test['versions'] is not None):
                if (not err.supports_version(test['versions'])):
                    continue
                if (for_appversions and (not (err._compare_version(requirements=for_appversions, support=test['versions']) and err.supports_version(for_appversions)))):
                    continue
            err.version_requirements = test['versions']
            test_func = test['test']
            if test['simple']:
                test_func(err)
            else:
                test_func(err, xpi_package)
        if (err.failed(fail_on_warnings=False) and (not err.determined)):
            err.unfinished = True
            err.discard_unused_messages(ending_tier=tier)
            return err
    return err
Tests a package's inner content.
def test_inner_package(err, xpi_package, for_appversions=None):
    
    populate_chrome_manifest(err, xpi_package)
    for tier in sorted(decorator.get_tiers()):
        err.set_tier(tier)
        for test in decorator.get_tests(tier, err.detected_type):
            if (test['versions'] is not None):
                if (not err.supports_version(test['versions'])):
                    continue
                if (for_appversions and (not (err._compare_version(requirements=for_appversions, support=test['versions']) and err.supports_version(for_appversions)))):
                    continue
            err.version_requirements = test['versions']
            test_func = test['test']
            if test['simple']:
                test_func(err)
            else:
                test_func(err, xpi_package)
        if (err.failed(fail_on_warnings=False) and (not err.determined)):
            err.unfinished = True
            err.discard_unused_messages(ending_tier=tier)
            return err
    return err