Ejemplo n.º 1
0
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()
Ejemplo n.º 2
0
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()
Ejemplo n.º 3
0
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()
Ejemplo n.º 4
0
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()
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
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