def test_valid_chrome_manifest(): "Chrome manifests must only contain certain elements" err = ErrorBundle() err.save_resource("chrome.manifest", ChromeManifest("locale foo bar", "")) langpack.test_langpack_manifest(err, MockXPI()) assert not err.failed() err.save_resource("chrome.manifest", ChromeManifest("foo bar asdf", "")) langpack.test_langpack_manifest(err, MockXPI()) assert err.failed()
def test_valid_chrome_manifest(): 'Chrome manifests must only contain certain elements' err = ErrorBundle() err.save_resource('chrome.manifest', ChromeManifest('locale foo bar', '')) langpack.test_langpack_manifest(err, MockXPI()) assert not err.failed() err.save_resource('chrome.manifest', ChromeManifest('foo bar asdf', '')) langpack.test_langpack_manifest(err, MockXPI()) assert err.failed()
def test_valid_chrome_manifest(): 'Chrome manifests must only contain certain elements' err = ErrorBundle() err.save_resource('chrome.manifest', chrome_manifest('locale foo bar')) langpack.test_langpack_manifest(err, MockXPI()) assert not err.failed() err.save_resource('chrome.manifest', chrome_manifest('foo bar asdf')) langpack.test_langpack_manifest(err, MockXPI()) assert err.failed()
def test_has_chrome_manifest(): """Makes sure the module fails when a chrome.manifest file is not available.""" assert langpack.test_langpack_manifest(None, {}, None) is None
def test_has_chrome_manifest(): """Makes sure the module fails when a chrome.manifest file is not available.""" assert langpack.test_langpack_manifest(ErrorBundle(), None) is None